serveur.py 480 Bytes
import socket

if __name__=='__main__':
	server.Socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM);
	serverSocket.bind(("172.26.145.62",9090)); # Adresse du serveur à modifer selon l'IP de la RASPBERRY
	while(True):
			dataFromClient, sourceAddress = serverSocket.recvfrom(1024);
			print("Data from %s is %s"%(sourceAddress,dataFromClient.decode()));
			serverSocket.sendto("Hello Client!".encode(),sourceAddress); # TODO : Modifier les donnees a renvoyer au serveur Web