mirror of https://github.com/DJ2LS/FreeDATA.git
first success with test
parent
d1fbd80e49
commit
8b6635c5b6
|
@ -12,7 +12,7 @@ import constants
|
||||||
from fastapi import Request, WebSocket
|
from fastapi import Request, WebSocket
|
||||||
class AppContext:
|
class AppContext:
|
||||||
def __init__(self, config_file: str):
|
def __init__(self, config_file: str):
|
||||||
self.config_manager = CONFIG(self, config_file)
|
self.config_manager = CONFIG(self, config_file)
|
||||||
self.constants = constants
|
self.constants = constants
|
||||||
self.p2p_data_queue = Queue()
|
self.p2p_data_queue = Queue()
|
||||||
self.state_queue = Queue()
|
self.state_queue = Queue()
|
||||||
|
|
|
@ -553,7 +553,7 @@ class DataFrameFactory:
|
||||||
}
|
}
|
||||||
return self.construct(FR_TYPE.P2P_CONNECTION_HEARTBEAT, payload)
|
return self.construct(FR_TYPE.P2P_CONNECTION_HEARTBEAT, payload)
|
||||||
|
|
||||||
def build_p2p_connection_heartbeat_ack(self, session_id, flag_has_data=False, flag_announce_arq=False):
|
def build_p2p_connection_heartbeat_ack(self, session_id, flag_has_data=False, flag_announce_arq=False):
|
||||||
flag = 0b00000000
|
flag = 0b00000000
|
||||||
if flag_has_data:
|
if flag_has_data:
|
||||||
flag = helpers.set_flag(flag, 'HAS_DATA', True, self.P2P_FLAGS)
|
flag = helpers.set_flag(flag, 'HAS_DATA', True, self.P2P_FLAGS)
|
||||||
|
|
Loading…
Reference in New Issue