Adjusted StreamDataMessage overhead calculation

This commit is contained in:
Mark Qvist 2023-03-04 19:06:47 +01:00
parent 37b2d8a6ec
commit 80f3bfaece
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class StreamDataMessage(MessageBase):
_link_sized_bytes = ("\0"*RNS.Link.MDU).encode("utf-8")
StreamDataMessage.OVERHEAD = len(StreamDataMessage(stream_id=StreamDataMessage.STREAM_ID_MAX,
data=_link_sized_bytes,
eof=True).pack()) - len(_link_sized_bytes) - 6 # 6 is envelope overhead
eof=True).pack()) - len(_link_sized_bytes) + 4 # TODO: Calculation was off by 10 bytes, why?
StreamDataMessage.MAX_DATA_LEN = RNS.Link.MDU - StreamDataMessage.OVERHEAD
_link_sized_bytes = None