mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
added rx part for larger data
This commit is contained in:
parent
bb8da6f5d8
commit
f308134276
2 changed files with 9 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue