added rx part for larger data

This commit is contained in:
DJ2LS 2024-03-19 22:16:27 +01:00
parent bb8da6f5d8
commit f308134276
2 changed files with 9 additions and 5 deletions

View file

@ -181,7 +181,11 @@ class ARQDataTypeHandler:
decompressed_data = gzip.decompress(data)
self.log(f"Handling gzip compressed P2P_CONNECTION data: {len(decompressed_data)} Bytes from {len(data)} Bytes")
print(self.state_manager.p2p_connection_sessions)
return decompressed_data
print(decompressed_data)
print(self.state_manager.p2p_connection_sessions)
for session_id in self.state_manager.p2p_connection_sessions:
print(session_id)
self.state_manager.p2p_connection_sessions[session_id].received_arq(decompressed_data)
def failed_p2p_connection(self, data, statistics):
decompressed_data = gzip.decompress(data)

View file

@ -308,8 +308,8 @@ class P2PConnection:
self.last_data_timestamp = time.time()
self.set_state(States.CONNECTED)
def received_arq(self):
pass
def received_arq(self, data):
self.last_data_timestamp = time.time()
self.set_state(States.CONNECTED)
self.p2p_data_rx_queue.put(data)