Client/Server based on SocketServer and Windows
julien.chevalier at gmail.com
Sun Aug 9 18:22:40 CEST 2009
I've written a small Client/server system.
Basically, i'm expecting something like : The client sends every once
and a while a small data chunk (not more than 50 bytes) the server
receive it and print it.
Here is the server request handler :
data = self.request.recv(1024)
cur_thread = threading.currentThread()
response = "%s: %s from Foo" % (cur_thread.getName(),
and this is the client :
def clientPrompt(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print "%s\n" % k
if k == 'quit': break
My problem comes from that I can't send data from client more than
once without having the following Winsock error : 10053 Software
caused connection abort.
I have to restart the client each time I want to send a new message.
Could anyboy explain me why ?
More information about the Python-list