From 0acb55dbb2d251472f902b3bb721fd888ab9a31f Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 08 一月 2024 17:37:32 +0800
Subject: [PATCH] 增加获取当前正在委托详情API/下单后立马移除红名单

---
 utils/socket_util.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/utils/socket_util.py b/utils/socket_util.py
index 941ba39..fc493e2 100644
--- a/utils/socket_util.py
+++ b/utils/socket_util.py
@@ -80,3 +80,17 @@
         return True
     else:
         return False
+
+
+# 绔彛鏄惁琚崰鐢�
+def is_port_bind(port):
+    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+    result = sock.connect_ex(('127.0.0.1', port))
+    if result == 0:
+        return True
+    else:
+        return False
+
+
+if __name__ == "__main__":
+    pass

--
Gitblit v1.8.0