client
This commit is contained in:
commit
0e64a0cd30
15
demo_client.py
Normal file
15
demo_client.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import socket
|
||||||
|
|
||||||
|
eingabe = input("Bitte etwas eingeben:")
|
||||||
|
|
||||||
|
s = socket.socket()
|
||||||
|
host = socket.gethostname()
|
||||||
|
port = 12346
|
||||||
|
|
||||||
|
s.connect((host, port))
|
||||||
|
s.send(eingabe)
|
||||||
|
bytes = s.recv(1024)
|
||||||
|
print(bytes.decode('utf-8'))
|
||||||
|
print('Receipt')
|
||||||
|
|
||||||
|
s.close()
|
Loading…
x
Reference in New Issue
Block a user