mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 21:50:18 +00:00
Cleanup
This commit is contained in:
parent
3a2b12f9ad
commit
d121562b22
@ -26,12 +26,13 @@ class TCPClientInterface(Interface):
|
||||
def __init__(self, owner, name, target_ip=None, target_port=None, connected_socket=None):
|
||||
self.IN = True
|
||||
self.OUT = False
|
||||
self.transmit_delay = 0.001
|
||||
self.socket = None
|
||||
self.parent_interface = None
|
||||
|
||||
self.name = name
|
||||
|
||||
# TODO: Optimise so this is not needed
|
||||
self.transmit_delay = 0.001
|
||||
|
||||
if connected_socket != None:
|
||||
self.receives = True
|
||||
self.target_ip = None
|
||||
@ -61,6 +62,7 @@ class TCPClientInterface(Interface):
|
||||
def processOutgoing(self, data):
|
||||
if self.online:
|
||||
try:
|
||||
time.sleep(self.transmit_delay)
|
||||
data = bytes([HDLC.FLAG])+HDLC.escape(data)+bytes([HDLC.FLAG])
|
||||
self.socket.sendall(data)
|
||||
except Exception as e:
|
||||
|
@ -11,6 +11,8 @@ class UdpInterface(Interface):
|
||||
def __init__(self, owner, name, bindip=None, bindport=None, forwardip=None, forwardport=None):
|
||||
self.IN = True
|
||||
self.OUT = False
|
||||
|
||||
# TODO: Optimise so this is not needed
|
||||
self.transmit_delay = 0.001
|
||||
|
||||
self.name = name
|
||||
|
Loading…
Reference in New Issue
Block a user