Lancer ces 2 programmes dans 2 terminaux séparés: #!/usr/bin/python3 # -*- coding: utf-8 -* #Bertrand Vandeportaele 2021 #struct — Interpret strings as packed binary data #https://docs.python.org/2/library/struct.html #https://stackoverflow.com/questions/37093485/how-to-interpret-4-bytes-as-a-32-bit-float-using-python/37093610 import struct #https://waytolearnx.com/2020/06/socket-udp-client-serveur-avec-python.html import socket import time destIP='127.0.0.1' portOut=9999 numero=1 val1=3.14159; val2=1.23456; val3=8.654231; addrPort = (destIP, portOut) bufferSize = 1024 # Créer un socket UDP coté client s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) while True: # #!/usr/bin/python3 # -*- coding: utf-8 -* #Bertrand Vandeportaele 2021 import struct import socket destIP='127.0.0.1' portOut=9999 # Créer une socket datagramme s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # Lier à l'adresse IP et le port s.bind((destIP, portOut)) print("Serveur UDP à l'écoute") # Écoutez les datagrammes entrants while(True): addr = s.recvfrom(1024) #message = addr[0] aa= bytearray(addr[0]) valreconstruite=struct.unpack('