12345678910111213141516171819 |
- import socket
- clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- #host = '192.168.1.105'
- host = socket.gethostname()
- port = 4440
- clientsocket.connect((host, port))
- message = clientsocket.recv(1024)
- clientsocket.close()
- print(message.decode('ascii'))
|