admin
2025-06-04 287c506725b2d970f721f80169f83c2418cb0991
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import json
import socket
 
import requests
 
from code_attribute.code_price_manager import CodesLimitRateManager
from utils import tool, socket_util
from utils.block_web_api import THSBlocksApi
from utils.history_k_data_util import HistoryKDatasUtils
 
if __name__ == "__main__":
    client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  # 生成socket,连接server
    # client.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, True)
    # client.ioctl(socket.SIO_KEEPALIVE_VALS, (1, 60 * 1000, 30 * 1000))
    client.connect(("192.168.3.122", 10009))
    client.sendall(socket_util.load_header(
        json.dumps({"type": "push_msg", "data": {"type": "update_position"}}).encode("utf-8")))