From a67dfb731440ebce5f92ff0160139a1b1e1eb63f Mon Sep 17 00:00:00 2001 From: pouanideumassisergebeaujard Date: Sun, 20 Oct 2019 20:16:30 +0200 Subject: [PATCH] client and server modified --- client.py | 2 +- server.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.py b/client.py index f3a13d0..ed29139 100644 --- a/client.py +++ b/client.py @@ -1,7 +1,7 @@ import socket s= socket.socket() host=socket.gethostname() -port= 1345 +port= 13345 s.connect((host , port)) msg = input('geben sie was ein: ') bytes= s.send(msg.encode('utf-8')) diff --git a/server.py b/server.py index 86a37dc..5e01377 100644 --- a/server.py +++ b/server.py @@ -1,15 +1,15 @@ import socket s = socket.socket() host = socket.gethostname() -port = 1345 +port = 13345 s.bind((host , port)) s.listen() while True: (connection, addr )= s.accept() print('verbindung von', addr) msg= 'Danke für das vorbeischauen!' - serge= s.recv(1024) - message = serge.decode('utf-8') + bytes= connection.recv(1024) + message = bytes.decode('utf-8') sendmessage= message.upper() connection.send(sendmessage.encode('utf-8')) connection.close() \ No newline at end of file