From 754fd6456634b69fa6c730aa3e32b82d56e96a47 Mon Sep 17 00:00:00 2001 From: colovicam63900 Date: Tue, 15 Oct 2019 15:24:25 +0200 Subject: [PATCH] Vers 2 --- client.py | 2 ++ server.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client.py b/client.py index 2d09d3f..0885fa6 100755 --- a/client.py +++ b/client.py @@ -6,7 +6,9 @@ port = 4444 eingabe = input ("Bitte etwas eingeben:") + s.connect((host, port)) +s.send(eingabe.encode("utf-8")) bytes = s.recv(1024) print(bytes.decode("utf-8")) s.close() \ No newline at end of file diff --git a/server.py b/server.py index b3eb2ba..d628f6e 100755 --- a/server.py +++ b/server.py @@ -9,6 +9,12 @@ s.listen() while True: (connection, addr) = s.accept() print("Verbindung von ", addr) - msg = "Danke für das Vorbeischauen!" - connection.send(msg.encode("utf-8")) + data = connection.recv(1024) + data = data.decode("utf-8") + data = data.upper() + print(data) + connection.send(data.encode("utf-8")) + + #msg = "Danke für das Vorbeischauen!" + # connection.send(msg.encode("utf-8")) connection.close() \ No newline at end of file