This commit is contained in:
Dream
2024-08-07 17:00:29 +08:00
parent e8e96d9a97
commit 5254a4ecbe
5 changed files with 215 additions and 18 deletions

View File

@ -1,8 +1,11 @@
import json
import socket
import threading
import time
class TCPClient:
def __init__(self,ip,port):
self.error_count=0
self.IPAddress = ip
self.port = port
self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@ -20,5 +23,18 @@ class TCPClient:
return False
def run(self):
while True:
time.sleep(30)
if (self.send_Command() and self.send_Status()):
self.error_count=0
def send_Command(self):
return False
def send_Status(self):
return False