Closed loudblow closed 9 months ago
Interesting catch, thanks.
That being said, this will never normally show up in Minecraft usage, as it would require the usage of RELIABLE_SEQUENCED.
Anyways it would be nice to fix this. I'm implementing my own RakNet library and have found that all the unofficial libraries and documentation have a maximum encapsulated packet (also known as a frame or message) header size of 20, but my calculations don't match that number.
Why is it counted as 20 when the correct size is 23? https://github.com/pmmp/RakLib/blob/dc035a7b62e2594dd2b351bd8ec219c9a9595587/src/generic/SendReliabilityLayer.php#L135
You can calculate this using these lines: https://github.com/pmmp/RakLib/blob/dc035a7b62e2594dd2b351bd8ec219c9a9595587/src/protocol/EncapsulatedPacket.php#L80
1 byte (flags) + 2 bytes (payload length) + 3 bytes (reliable index) + 3 bytes (sequence index) + 3 bytes (order index) + 1 byte (order channel) + 4 bytes (compound size) + 2 bytes (compound id) + 4 bytes (compound index) = 23