socket_server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket_server.bind(('localhost', 5555))
socket_server.listen(5)
while True:
conn, addr = socket_server.accept()
print('Connected by', addr)
with conn:
while True:
data = conn.recv(1024)
if not data: break