Gesteuerter Verbindungsabbau (hostname geändert)
This commit is contained in:
parent
00834eb1be
commit
89d83fe213
@ -2,7 +2,7 @@ import socket
|
|||||||
|
|
||||||
|
|
||||||
s = socket.socket()
|
s = socket.socket()
|
||||||
host = socket.gethostname()
|
host = socket.gethostbyname('localhost')
|
||||||
port = 22225
|
port = 22225
|
||||||
|
|
||||||
s.connect((host, port))
|
s.connect((host, port))
|
||||||
@ -18,5 +18,4 @@ while message != 'STOP':
|
|||||||
bytes = s.recv(4096)
|
bytes = s.recv(4096)
|
||||||
print(bytes.decode('utf-8'))
|
print(bytes.decode('utf-8'))
|
||||||
else:
|
else:
|
||||||
print(message)
|
|
||||||
s.close()
|
s.close()
|
Loading…
x
Reference in New Issue
Block a user