# serveur TCP from socket import socket serveur = socket() serveur.bind( ('0.0.0.0', 9999) ) serveur.listen() while True: (sclient, adclient) = serveur.accept() donnees = sclient.recv(1000) while donnees: print (donnees.decode(), end='') donnees = sclient.recv(1000) sclient.close()