diff --git a/src/Python/socket/socketServer.py b/src/Python/socket/socketServer.py index aff8942..252994e 100644 --- a/src/Python/socket/socketServer.py +++ b/src/Python/socket/socketServer.py @@ -1,6 +1,5 @@ import socket - HOST = "127.0.0.1" # Standard loopback interface address (localhost) PORT = 4024 # Port to listen on (non-privileged ports are > 1023) @@ -13,9 +12,8 @@ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: conn.sendall(b"hallo") while True: data = conn.recv(2048) - conn.sendall(input("Enter message: ").encode()) - if (data): + if data: print("received", repr(data)) + conn.sendall(b"message received") if not data: - break - conn.sendall(data) \ No newline at end of file + break \ No newline at end of file