12345678910111213141516171819202122232425262728293031323334 |
- import socket
- HOST = '192.168.50.188'
- PORT = 1881
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect((HOST, PORT))
- while True:
- indata = s.recv(1024)
- if len(indata) == 0:
- s.close()
- print('server closed connection.')
- break
- print('recv: ' + indata.decode())
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|