move towards single implementation for socket client/server using asyncore and threads

This commit is contained in:
2015-09-06 22:48:23 +01:00
parent 97613337c6
commit ba882d7e2b
18 changed files with 158 additions and 243 deletions

View File

@@ -14,7 +14,7 @@ class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
pass
def client(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock = socket.mysocket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(message)