From 568c763084b926a6f2d632b7ac65b9ec8280752f Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 10 六月 2025 15:41:34 +0800
Subject: [PATCH] 网页功能完善

---
 utils/network_util.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/network_util.py b/utils/network_util.py
index 60b54fe..8a2306f 100644
--- a/utils/network_util.py
+++ b/utils/network_util.py
@@ -15,9 +15,9 @@
 # HTTP_PORT = 9005
 
 
-def socket_request(data):
+def socket_request(data, host=constant.SERVER_HOST, port=SOCKET_PORT):
     client = socket.socket()  # 鐢熸垚socket锛岃繛鎺erver
-    ip_port = (constant.SERVER_HOST, SOCKET_PORT)  # server鍦板潃鍜岀鍙e彿锛堟渶濂芥槸10000浠ュ悗锛�
+    ip_port = (host, port)  # server鍦板潃鍜岀鍙e彿锛堟渶濂芥槸10000浠ュ悗锛�
     client.connect(ip_port)
     if type(data) != str:
         client.send(socket_util.load_header(json.dumps(data).encode("utf-8")))

--
Gitblit v1.8.0