Blame view

html/Python/client.py 290 Bytes
cdb865f1   lwadbled   feat(Python): Ajo...
1
  import socket
da5d2b56   lwadbled   feat(Matrice): pe...
2
  import sys
cdb865f1   lwadbled   feat(Python): Ajo...
3
4
5
  
  if __name__ == '__main__':
  	clientSocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM);
da5d2b56   lwadbled   feat(Matrice): pe...
6
7
  	data = sys.argv[2];
  	clientSocket.sendto(data.encode(),(sys.argv[1],9090));
cdb865f1   lwadbled   feat(Python): Ajo...
8
9
  	dataFromServer,sourceAddress = clientSocket.recvfrom(1024);
  	print(dataFromServer.decode());