@@ -4,5 +4,5 @@ host=socket.gethostname() | |||
port= 12345 | |||
s.connect((host , port)) | |||
bytes= s.recv(1024) | |||
print(bytes.decode("utf-8") ) | |||
s.closed() | |||
print(bytes.decode('utf-8') ) | |||
s.close() |
@@ -5,8 +5,8 @@ port = 12345 | |||
s.bind((host , port)) | |||
s.listen() | |||
while True: | |||
(connection.addr )= s.accept() | |||
print("verbindung von", addr) | |||
msg= "Danke für das vorbeischauen!" | |||
connection.send(msg.encode("utf-8")) | |||
(connection, addr )= s.accept() | |||
print('verbindung von', addr) | |||
msg= 'Danke für das vorbeischauen!' | |||
connection.send(msg.encode('utf-8')) | |||
connection.close() |