2022-05-31 13:05:06 +00:00
|
|
|
import socket
|
2022-05-31 13:26:53 +00:00
|
|
|
import time
|
2022-05-31 13:05:06 +00:00
|
|
|
|
|
|
|
TCP_IP = '127.0.0.1'
|
|
|
|
TCP_PORT = 30002
|
|
|
|
|
|
|
|
message = "12.3,20.15"
|
|
|
|
|
|
|
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
|
|
s.connect((TCP_IP, TCP_PORT))
|
2022-05-31 13:26:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
time.sleep(1)
|
2022-05-31 13:05:06 +00:00
|
|
|
s.send(message.encode('utf-8'))
|
|
|
|
|
|
|
|
s.close()
|
|
|
|
|