https://wiki.python.org/moin/UdpCommunication import socket import time if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('localhost',8000)) for ii in range(10): print(b'Test' + bytes(ii)) s.send(b'Test' + bytes(ii)) s.close() import socket if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(('localhost',8000)) #s.listen(5) s.listen(1024) while True: c, addr = s.accept() data = c.recv(5) if data: print(data) s.close() Welcome to Etherpad! This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents! Get involved with Etherpad at http://etherpad.org