Python module which simplifies the task of writing network servers.
Questions tagged [socketserver]
385 questions
2
votes
2 answers
Delphi DataSnap SocketServer "Failed to create key 211"
If I try to terminate the Borland SocketServer application for Delphi 2009 the message above appears.
The application window remains open and I can only terminate the application in the task manager.
Operating system is Windows 2000 Professional…

mjn
- 36,362
- 28
- 176
- 378
2
votes
2 answers
python SocketServer.BaseRequestHandler knowing the port and use the port already opened
This is the code which i played, but each time i make a mistake i can't relaunch it.
It says to me that the port / socket is already used
That's the first question
The second one is in my MyTCPHandler how can i kno the port used ?
here is my code…

Bussiere
- 500
- 13
- 60
- 119
2
votes
1 answer
SocketServer does not release port on exit
I have the following issue with Python (2.7) socketserver:
import wx
import socket
from SocketServer import BaseRequestHandler, ThreadingTCPServer
from threading import Thread
from wx.lib.pubsub import pub
from GUI import GUI
class…

Peter V
- 71
- 4
2
votes
0 answers
How to pass extra information to request handler instances?
Is there a standard way to make extra information available to handlers from the socketserver module? The following is about the simplest solution I could think of, but it is unconvincing that this is the best way to make sure that handlers get…

Noctis Skytower
- 21,433
- 16
- 79
- 117
2
votes
2 answers
Can TCP/UDP sockets and Websockets communicate with each other?
I have been going through this websockets article.
Can a web-socket communicate with a TCP/UDP Socket and viceversa?

Taimoor Alam
- 113
- 1
- 11
2
votes
1 answer
How to set max number of connections in SocketServer
I'm trying to find a way how to set a limit - maximum number of connections in SocketServer.
class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
daemon_threads = True
class…

Milano
- 18,048
- 37
- 153
- 353
2
votes
0 answers
Simple SocketServer - client does not work after first request
I'm trying to create a simple server. This server should be able to handle requests from multiple clients. The problem is, that after second request by one client, it raises: socket.error: [Errno 10053] An established connection was aborted by the…

Milano
- 18,048
- 37
- 153
- 353
2
votes
1 answer
Python: setup() vs __init__ ()for a socketserver's handler class
I am trying to define a handler class for a socketserver. When the handler class had no __init__() method defined, my server worked. The message sent by the client was written to the output window. However, when I added an __init__() method to…

ROBERT RICHARDSON
- 2,077
- 4
- 24
- 57
2
votes
1 answer
ThreadingTCPServer won't exit when client connected
I am running a simple echo socketserver and whenever there is a client connected, ctrl C doesn't exit/terminate the server. Instead it "hangs" until client disconnects from the socket. I have read somewhere that this is due to there being a thread…

skyguy126
- 457
- 1
- 5
- 17
2
votes
1 answer
Socket connection between Java and Python
I have a simple Java Socket connected to my Python socketserver.
In the client I want to send some data with size given in input: I want first sent an Integer with the size of the data and then the chunk of byte data.
This is the client:
Integer…

Nicholas Allio
- 717
- 2
- 9
- 28
2
votes
1 answer
Python's SocketServer won''t handshake
The problem
I am trying to use the SocketServer that ships with Python but I have some issues in the handshake phase. The handshake works fine as long as I use localhost or 127.0.0.1. However when I put the IP of my eth0 card it just won't…

Pithikos
- 18,827
- 15
- 113
- 136
2
votes
2 answers
Create a socket in Swift
I'm trying to write a simple echo server with swift. The examples I found are either non-functional and low-level or written in objective-c.
I failed at a lot of things, I will start from the top. I cannot manage to create a simple socket using…

Lukas
- 9,752
- 15
- 76
- 120
2
votes
3 answers
Iterator :The type HTMLDocument.Iterator is not generic; it cannot be parameterized with arguments
Now I'm working on Socket Server, and made multi-thread for muliti-clients for a socket.
and Also put each thread of the connection into a HashMap to store the Objects of threads.
Here's the problem: I can't get returned keyset of the HashMap into…

Kyeongsik Jason Kim
- 117
- 1
- 10
2
votes
4 answers
Need Clarification in the socket server while loop
Below is a part of code from my socket server. I am not clear about some steps so I have some questions. My questions are below:
Why I need to use while (1)?
What is the purpose of exit (-1), will it close my socket?
Why the data_len is…

user3751012
- 533
- 1
- 8
- 20
2
votes
1 answer
Socketserver multiprocessing.Process is starting without calling start()
I have a problem with a Python script on my rpi. If I create a process object, it starts automatically and blocks everything else. I want it to run in the background, and to be able to start it by calling the start()…

w5e
- 199
- 1
- 12