Work on I2P Interface

This commit is contained in:
Mark Qvist 2022-02-23 21:39:29 +01:00
parent 4b3ead3db2
commit c357f7a94e

View File

@ -363,6 +363,8 @@ class I2PInterfacePeer(Interface):
while True: while True:
data_in = self.socket.recv(4096) data_in = self.socket.recv(4096)
if len(data_in) > 0: if len(data_in) > 0:
# TODO: Remove
RNS.log("Read "+str(len(data_in)))
pointer = 0 pointer = 0
while pointer < len(data_in): while pointer < len(data_in):
byte = data_in[pointer] byte = data_in[pointer]
@ -508,6 +510,7 @@ class I2PInterface(Interface):
for peer_addr in peers: for peer_addr in peers:
interface_name = peer_addr interface_name = peer_addr
peer_interface = I2PInterfacePeer(self, interface_name, peer_addr) peer_interface = I2PInterfacePeer(self, interface_name, peer_addr)
RNS.Transport.interfaces.append(peer_interface)
self.online = True self.online = True