Browse Source

client

master
Mai Gillmann 5 years ago
commit
0e64a0cd30
1 changed files with 15 additions and 0 deletions
  1. 15
    0
      demo_client.py

+ 15
- 0
demo_client.py View File

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…
Cancel
Save