Version_1

This commit is contained in:
Kevin Holzschuh 2019-10-15 14:46:38 +02:00
commit cf004f2950
2 changed files with 38 additions and 0 deletions

19
Client.py Normal file
View File

@ -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()

19
Server.py Normal file
View File

@ -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()