update 更新

This commit is contained in:
FrankCV2048
2024-08-12 23:01:32 +08:00
parent 5254a4ecbe
commit d4a16bcd6e
7 changed files with 529 additions and 225 deletions

View File

@ -4,7 +4,7 @@ import threading
import time
class TCPClient:
def __init__(self,ip,port):
def __init__(self, ip, port):
self.error_count=0
self.IPAddress = ip
self.port = port
@ -12,12 +12,12 @@ class TCPClient:
def CreatConnect(self):
self.client_socket.connect(self.IPAddress, self.port)
self.client_socket.connect((self.IPAddress, self.port))
def is_Connect(self):
try:
self.client_socket.send(b'', socket.MSG_DONTWAIT)
self.client_socket.send(b'')
return True
except OSError:
return False