Questions tagged [socketserver]

Python module which simplifies the task of writing network servers.

385 questions
0
votes
1 answer

How to allow or deny remote connections in Python's SocketServer?

I'm creating an extremely simple Vega visualization viewer: it's a one file module that serves a base HTML page containing just the Vega graphic and an HTML5 EventSource of updates. The user (me) is working in a Python shell through ssh, creates an…
Jim Pivarski
  • 5,568
  • 2
  • 35
  • 47
0
votes
1 answer

How to protect against DDOS attack socketserver python

I'm planning on incorporating a server into an application I'm developing (none of the data being transferred will be sensitive). I've set up port forwarding on my router that points to the server on the network. Here is a snippet of the server side…
aL_eX
  • 1,453
  • 2
  • 15
  • 30
0
votes
2 answers

Is it possible to use java ServerSocket to accept HTTPs requests

I have the following code, works fine for sending HTTP requests but how do I convert it so that it support HTTPs requests? public test() throws Exception { ServerSocket ss = new ServerSocket(32567); Socket client = null; …
zackhalil
  • 455
  • 3
  • 14
0
votes
0 answers

httpd.serve_forever Does not keep server running

I have an HTTP server and every time I add a function or add a print mechanism it Brings me an error. For example in this Situation I am trying to have a management console and I go to the URL of the server and well nothing but a cannot connect in…
0
votes
1 answer

Socket Server//Not working

This is a socket server I created in Python, but when I run it, it highlight the while loop inside threaded_client and a alert box turn up. It says 'invalid syntax'. Can anyone tell me what is happening. Also, when I comment out anything, the error…
HELP
  • 33
  • 7
0
votes
1 answer

Java Socket - how to check if the ServerSocket is already in use by another client

I have this client and server programs. The client get a command from user, and send it to the server, and the server return the result (output of the command) to the client. I have 2 classes Command and CommandResult (represents the command and the…
avicohh
  • 177
  • 1
  • 3
  • 11
0
votes
1 answer

Expected 5 arguments given 4 in socker server constructor overriding

I'm trying to override the constructor of the TCPHandler class so that I can pass variables to the handler function, I have come across other posts on stack but they weren't clear to me. I have to pass a byte array to the sendall function in the…
user7735165
0
votes
1 answer

How to stay connected to a single specified client

I have the below code and it receives the data I want, how I want, then terminates. How can I set this to connect to my client that always has the same IP and remain connected or listening from that client? Its a barcode scanner and sends the data…
DevJustin
  • 103
  • 1
  • 7
0
votes
0 answers

NSData and String in Swift3

I'm developing an iOS application in Swift 3, and I want to interact via wifi with my RPi,using a Simple Socket Server method. Here in this part of program, @IBAction func ButtoniPhone(_ sender: UIButton) { let data : NSData = "C'est…
Saeid S
  • 31
  • 6
0
votes
1 answer

Python multithreaded socket. How to send message to specific client?

I'm new in python so please bear with me. I'm writing a GUI with server side and client side. clients are able to connect to the server. Then the server can choose clients that it wants to communicate with. But now i'm facing a problem. I don't know…
0
votes
0 answers

Python - socketserver & sqlite3: Can't put messages into the database

I have been facing trouble where I could not put the data sent through the server to the database. I used the python's socketserver and sqlite3 class as the server and the database. Here's my code: import socketserver import sqlite3 …
kevoo11
  • 3
  • 1
  • 1
  • 5
0
votes
1 answer

python tcp socketserver and the differences between windows and unix clients

I feel this is a very basic question, but my google-fu is not yielding any specific hits. My problem is related to socket communication differences between windows and unix tcp clients. If i serve up the very basic tcp server code below, and…
Zach Tran
  • 3
  • 2
0
votes
2 answers

Configure SocketServer to work with Django

I have a device that communicates with TCP port. It came with an desktop application which only runs in windows. but I want to use it in a linux server and with a django app. I tried to communicate with SocketServer library and it works fine but i'm…
0
votes
0 answers

python socket server address already in use

Hi I'm trying use python's SocketServer.TCPServer The question here doesn't give any solution and closed as unclear My sample code class MyTCPHandler(SocketServer.BaseRequestHandler): def handle(self): # self.request is the TCP socket…
0
votes
1 answer

global name 'WebServer' is not defined

Please find below code as it is throwing the error - global name 'webserver' is not defined. import SimpleHTTPServer import SocketServer import os from threading import Thread import threading class WebServer(Thread): def __init__(self,…