Python module which simplifies the task of writing network servers.
Questions tagged [socketserver]
385 questions
1
vote
1 answer
Socket server program does not wait for client in "accept" stage and runs in infinite loop
If I run my below socket server program, it does not wait for a connection from the client in "accept" stage, rather it starts running in an infinite loop. My program is saved as server.c and I tried to run it in the command line with the below…

user3751012
- 533
- 1
- 8
- 20
1
vote
0 answers
error is [Errno 131] Connection reset by peer followed by error: [Errno 9] Bad file descriptor
I am using a python chat room server from this code but I am having a issue in running with the client's exceptional behaviour, my server hangs and stops working when my Android client switches to another network and then switches back to chat…

slashRahul
- 555
- 5
- 18
1
vote
1 answer
gethostname() returns accurate hostname, bind() doesn't like it
Doing a python socket tutorial, entire codebase is as follows
import socket as so
s = so.socket()
host = so.gethostname()
port = 12345
s.bind((host, port))
s.listen(5)
while True:
c, addr = s.accept()
print 'Got connection from', addr
…

Nils Guillermin
- 1,867
- 3
- 21
- 51
1
vote
1 answer
Problems with java sockets
I'm trying to reprodruce a client-server architecture in order to understand java sockets.
So I have a client that sends a message to the server, and the server just "say" something like "(Server) "
So here we go :
public class ServeurTCP {
static…

TLR
- 577
- 3
- 8
- 24
1
vote
0 answers
Error 10054 api recv with Delphi SocketServer
This question is about this message "socket error: an existing connection was forcibly closed by the remote host (10054), on api 'recv'"
We have a multitier application that we created using Delphi and uses Borland Socket Server on application…

zedmartins
- 115
- 1
- 10
1
vote
1 answer
Socket file transfer from webserver
So, I have a desktop application and I want it to be able to check a website for new versions of itself. I am completely new to sockets (Windsocks and Berkeley), so before I invest time learning network programming I want some guidance to point me…

Miguel
- 872
- 1
- 12
- 26
1
vote
3 answers
python listen 2 port same file
I would like to listen on 2 different UDP port with the same server.
I use SocketServer lib for my server, and basicly it looks like that;
SocketServer.UDPServer(('', 7878),CLASSNAME)
I would like to listen on 7878 and 7879 with the same server and…

beratch
- 277
- 2
- 6
- 8
1
vote
1 answer
How to only allow one client to connect to my TCPSocketServer?
I have overridden the handle function. Right now, every time a client connects, it will keep the socket open to echo what the client sent in all caps. The server should not allow more than one connection, thus only one socket is kept open. How would…

user791953
- 629
- 2
- 8
- 20
1
vote
2 answers
best practice to test socket server?
I'm developing a socket server game using java. I want to test if server works properly (how it handles received messages, process and response in right way...) without using game client(heavy and not completed). Messages from client maybe raw…

tiboo
- 8,213
- 6
- 33
- 43
1
vote
1 answer
Python Socket Download/Upload Image Files Missing Binaries
I'm using python SocketServer to download/upload multi image files.
Server Code
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
'''
Here is other codes......
'''
#start…

HWW
- 557
- 2
- 6
- 15
1
vote
2 answers
Possible Socket + ServerSocket in java?
We are making an somewhat RTS networked game in java. i have this main server that accepts other players which has the serversocket. Then on our game when you created your own game room
i filtered all the players that has joined my room.then when…

the bosxcz
- 91
- 3
- 13
1
vote
1 answer
SocketServer used to control PiBot remotely (python)
this is my first question! (despite using the site to find most of the answers to programming questions i've ever had)
I have created a PiBotController which i plan to run on my laptop which i want to pass the controls (inputs from arrow keys) to…

D Mason
- 86
- 4
- 17
1
vote
2 answers
Accepting client request with server Socket
I am trying creating a socket connection to a web server.
import java.io.IOException;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
public class Connection{
public final static int PORT = 1337;
public…

Jonathan
- 545
- 1
- 8
- 27
1
vote
1 answer
Python SocketServer deadlock issue
When I'm threading the SocketServer instance (the serve_forever method) I can quit it easily when sending the text "shutdown", which is what I expect. However, if its not threaded then I run into the issue of it locking up and I can't figure out…

Eric Hansen
- 193
- 1
- 2
- 8
1
vote
1 answer
Python ForkingTCPServer error
Help to build python ForkingTCPServer. This server returns an error when client connects to the server. When I use ThreadingTCPServer instead of ForkingTCPServer it works fine. socketFileIO module contains functions for pickle to/from socket:…

Volodimir Kopey
- 570
- 8
- 15