Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More accurate packet sizes #7

Open
UkoeHB opened this issue Apr 21, 2024 · 0 comments
Open

More accurate packet sizes #7

UkoeHB opened this issue Apr 21, 2024 · 0 comments

Comments

@UkoeHB
Copy link
Owner

UkoeHB commented Apr 21, 2024

Problem

Currently renet and this fork are configured to have 1300 byte payloads. However, the netcode implementation uses 1200 bytes as the max payload size (plus 17-25 bytes for the header and MAC).

This matches quinn which calls for a 1200 byte MTU. However, quinn adds additional headers. I measured around 70 bytes for clients, and 90 bytes for servers (via Wireshark).

Solution

  • Change the default payload size back to 1200 for UDP sockets.
  • Allow sockets to specify their own max payload size. This opens the way for mega-sized packets for custom data channels that can support it (e.g. in-memory channels can be configured to have 64kb payloads).
  • Set max payload size to 1100 bytes for the WebTransport socket, to account for the additional headers/encryption.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant