commit cf004f2950478464409228af347ec60d55fb2a9b Author: holzschuhke56905 Date: Tue Oct 15 14:46:38 2019 +0200 Version_1 diff --git a/Client.py b/Client.py new file mode 100644 index 0000000..61985ac --- /dev/null +++ b/Client.py @@ -0,0 +1,19 @@ +import socket + +SOCKET = socket.socket() +HOST = socket.gethostname() +PORT = 45677 + + + +# Eingabe +eingabe = input("Eingabe: ") + +# Verbindung zum Server +SOCKET.connect((HOST, PORT)) + +SOCKET.send(eingabe.encode("utf-8")) + + + +SOCKET.close() \ No newline at end of file diff --git a/Server.py b/Server.py new file mode 100644 index 0000000..7470f4d --- /dev/null +++ b/Server.py @@ -0,0 +1,19 @@ +import socket + +SOCKET = socket.socket() +HOST = socket.gethostname() +PORT = 45677 + + +SOCKET.bind((HOST, PORT)) +SOCKET.listen() + + + +(connection, addr) = SOCKET.accept() + +eingabe = connection.recv(1024) +print(eingabe.decode) + + +SOCKET.close() \ No newline at end of file