I have this code
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): _data = self.request.recv(1024) Utils.log("Received from %s: %s" % (self.client_address, _data))
calling him
kamcon_server = ThreadedTCPServer((HOST, 3011), ThreadedTCPRequestHandler) server_thread = threading.Thread(target = kamcon_server.serve_forever) server_thread.setDaemon(True) server_thread.start()
I can connect to the host and the server can send data, but when the client sends something to the server, the connection is automatically closed. What for? Thanks.
Maymo source share