Administrator
2023-08-15 c4bfa1c19e03bd62761f05bdf82123457f41997b
++++++++++++++++
bug修复-
2个文件已修改
8 ■■■■■ 已修改文件
huaxin_api/client_network.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/trade_server.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
huaxin_api/client_network.py
@@ -7,6 +7,7 @@
SERVER_IP = "127.0.0.1"
SERVER_PORT = 10008
class SendResponseSkManager:
    __send_response_sk_dict = {}
@@ -28,8 +29,7 @@
                pass
    @classmethod
    def create_send_response_sk(cls):
        addr, port = SERVER_IP, SERVER_PORT
    def create_send_response_sk(cls, addr=SERVER_IP, port=SERVER_PORT):
        client = socket.socket()  # 生成socket,连接server
        client.connect((addr, port))
        return client
trade/huaxin/trade_server.py
@@ -12,6 +12,7 @@
import dask
import psutil
import huaxin_api.constant
from line_profiler import LineProfiler
import constant
@@ -386,7 +387,8 @@
class OutsideApiCommandCallback(outside_api_command_manager.ActionCallback):
    @classmethod
    def __send_response(cls, data_bytes):
        sk = SendResponseSkManager.create_send_response_sk()
        sk = SendResponseSkManager.create_send_response_sk(addr=huaxin_api.constant.SERVER_IP,
                                                           port=huaxin_api.constant.SERVER_PORT)
        try:
            data_bytes = socket_util.load_header(data_bytes)
            sk.sendall(data_bytes)