Vers 2
This commit is contained in:
parent
8f013416bf
commit
754fd64566
@ -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()
|
10
server.py
10
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()
|
Loading…
x
Reference in New Issue
Block a user