|
|
|
|
|
|
|
|
|
|
|
|
|
|
while True: |
|
|
while True: |
|
|
(connection, addr) = s.accept() |
|
|
(connection, addr) = s.accept() |
|
|
print("Verbindung von ", addr) |
|
|
|
|
|
data = connection.recv(1024) |
|
|
|
|
|
data = data.decode("utf-8") |
|
|
|
|
|
data = data.upper() |
|
|
|
|
|
print(data) |
|
|
|
|
|
connection.send(data.encode("utf-8")) |
|
|
|
|
|
|
|
|
bytes = connection.recv(1024) |
|
|
|
|
|
msg = bytes.decode("utf-8") |
|
|
|
|
|
ans = msg.upper() |
|
|
|
|
|
connection.send(ans.encode("utf-8")) |
|
|
|
|
|
connection.close() |
|
|
|
|
|
|
|
|
#msg = "Danke für das Vorbeischauen!" |
|
|
#msg = "Danke für das Vorbeischauen!" |
|
|
# connection.send(msg.encode("utf-8")) |
|
|
# connection.send(msg.encode("utf-8")) |
|
|
connection.close() |
|
|
|
|
|
|
|
|
#connection.close() |