This commit is contained in:
xyj 2024-03-09 15:47:56 +08:00
parent b004b94a9a
commit d18b591c81
2 changed files with 5 additions and 4 deletions

BIN
.venv.zip Normal file

Binary file not shown.

View File

@ -1,6 +1,7 @@
# coding=utf-8 # coding=utf-8
# 多线程TCP服务器 # 多线程TCP服务器
import json import json
import time
import pyautogui import pyautogui
import socket import socket
@ -61,8 +62,8 @@ def handle_client(client_socket):
print(data) print(data)
if is_black(data): if is_black(data):
print("黑名单") print("黑名单")
client_socket.send(b"ACK!") # client_socket.send(b"ACK!")
client_socket.close() # client_socket.close()
return return
Point = data["Point"] Point = data["Point"]
x = Point[0]["X"] x = Point[0]["X"]
@ -70,8 +71,8 @@ def handle_client(client_socket):
click_it(x, y) click_it(x, y)
except Exception as e: except Exception as e:
pass pass
client_socket.send(b"ACK!") # client_socket.send(b"ACK!")
client_socket.close() # client_socket.close()
# 等待连接,这里必定进入循环 # 等待连接,这里必定进入循环