Blame view

Python/serveur.py 480 Bytes
cdb865f1   lwadbled   feat(Python): Ajo...
1
2
3
4
  import socket
  
  if __name__=='__main__':
  	server.Socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM);
ceef8241   lwadbled   fix(Python): Comm...
5
  	serverSocket.bind(("172.26.145.62",9090)); # Adresse du serveur à modifer selon l'IP de la RASPBERRY
cdb865f1   lwadbled   feat(Python): Ajo...
6
7
8
  	while(True):
  			dataFromClient, sourceAddress = serverSocket.recvfrom(1024);
  			print("Data from %s is %s"%(sourceAddress,dataFromClient.decode()));
ceef8241   lwadbled   fix(Python): Comm...
9
  			serverSocket.sendto("Hello Client!".encode(),sourceAddress); # TODO : Modifier les donnees a renvoyer au serveur Web