1.termin
This commit is contained in:
1 parent
faa0fa5553
commit
e77996535f
2 files changed
+21
-4
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import socket
|
||||
|
||||
s = socket.socket()
|
||||
host = socket.gethostname()
|
||||
port = 21345
|
||||
|
||||
s.connect((host, port))
|
||||
bytes = s.recv(1024)
|
||||
print(bytes.decode('utf-8'))
|
||||
|
||||
msg = input('Hier Eingabe: ')
|
||||
msg = msg.encode('utf-8')
|
||||
s.send(msg)
|
||||
bytes = s.recv(1024)
|
||||
print(bytes.decode('utf-8'))
|
||||
s.close()
|
||||
Reference in new issue
Block a user