update 更新
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user