import socket HOST = '192.168.1.138' PORT = 8888 client_id = None #create an INET, STREAMing socket serversocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM) #bind the socket to a public host, # and a well-known port serversocket.bind((HOST, 8888)) #become a server socket serversocket.listen(5) while 1: #accept connections from outside (clientsocket, address) = serversocket.accept() #now do something with the clientsocket #in this case, we'll pretend this is a threaded server global data data = clientsocket.recv(10000000) print (data) clientsocket.sendall(b'Tanan') clientsocket.close() #break