more p2p adjustments

pull/976/head
DJ2LS 2025-05-02 13:59:54 +02:00
parent 2b24f77c63
commit 0be46148b5
2 changed files with 6 additions and 3 deletions

View File

@ -245,9 +245,9 @@ class DataFrameFactory:
if not isinstance(item_length, int):
item_length = len(content[key])
print(frame_length)
print(item_length)
print(content)
#print(frame_length)
#print(item_length)
#print(content)
if buffer_position + item_length > frame_length:
raise OverflowError("Frame data overflow!")
frame[buffer_position: buffer_position + item_length] = content[key]

View File

@ -43,6 +43,8 @@ class P2PConnection:
FRAME_TYPE.P2P_CONNECTION_CONNECT_ACK.value: 'connected_iss',
FRAME_TYPE.P2P_CONNECTION_PAYLOAD.value: 'received_data',
FRAME_TYPE.P2P_CONNECTION_DISCONNECT.value: 'received_disconnect',
FRAME_TYPE.P2P_CONNECTION_HEARTBEAT.value: 'received_heartbeat',
},
States.PAYLOAD_SENT: {
FRAME_TYPE.P2P_CONNECTION_PAYLOAD_ACK.value: 'transmitted_data',
@ -53,6 +55,7 @@ class P2PConnection:
States.ARQ_SESSION: {
FRAME_TYPE.P2P_CONNECTION_PAYLOAD_ACK.value: 'transmitted_data',
FRAME_TYPE.P2P_CONNECTION_DISCONNECT.value: 'received_disconnect',
FRAME_TYPE.P2P_CONNECTION_HEARTBEAT.value: 'received_heartbeat',
},
States.DISCONNECTING: {