mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-14 20:32:50 -04:00
Cleanup and echo example
This commit is contained in:
parent
e66622bd69
commit
cfb1ed84d2
4 changed files with 41 additions and 28 deletions
|
@ -37,13 +37,9 @@ class UdpInterface(Interface):
|
|||
|
||||
|
||||
def processIncoming(self, data):
|
||||
# TODO: remove
|
||||
#FPE.log("IN: "+FPE.prettyhexrep(data))
|
||||
self.owner.inbound(data)
|
||||
|
||||
def processOutgoing(self,data):
|
||||
# TODO: remove
|
||||
#FPE.log("OUT: "+FPE.prettyhexrep(" "+data))
|
||||
udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
udp_socket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
|
||||
udp_socket.sendto(data, (self.forward_ip, self.forward_port))
|
||||
|
@ -57,7 +53,5 @@ class UdpInterfaceHandler(SocketServer.BaseRequestHandler):
|
|||
|
||||
def handle(self):
|
||||
if (UdpInterfaceHandler.interface != None):
|
||||
# TODO: remove
|
||||
#FPE.log("Datagram contents: "+FPE.prettyhexrep(self.request[0]))
|
||||
data = self.request[0]
|
||||
UdpInterfaceHandler.interface.processIncoming(data)
|
Loading…
Add table
Add a link
Reference in a new issue