client



In [4]:
import socket
import time

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 
 
sock.connect(('127.0.0.1', 8001))  

time.sleep(2) 
 
sock.send('2')  
print sock.recv(1024) 

sock.close()


bye

In [ ]: