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

add a way for the user to get current datagram limit #4259

Open
nanokatze opened this issue Jan 21, 2024 · 1 comment
Open

add a way for the user to get current datagram limit #4259

nanokatze opened this issue Jan 21, 2024 · 1 comment

Comments

@nanokatze
Copy link
Contributor

nanokatze commented Jan 21, 2024

Right now there's no way for the user to know how big they can make their datagrams before they're dropped during packing and thus have to size their datagrams to something conservative. Having an API to get current datagram size limit would let some users utilize available packet space better.

@marten-seemann
Copy link
Member

API-wise, it would be reasonable to add this to the ConnectionState. The value would be min(peer limit, max frame size according to current MTU / connection ID length). The second part would be: mtu - header size - aead overhead - framing overhead.
This feels a little bit brittle, but we could have an integration test that checks that the value reported actually works, and that value+1 doesn't work.

I'd be happy to review a PR, if you (or anyone else) want to work on this. Please let me know if you have any concerns or different ideas.

nanokatze pushed a commit to nanokatze/quic-go that referenced this issue Jan 31, 2024
nanokatze pushed a commit to nanokatze/quic-go that referenced this issue Jan 31, 2024
nanokatze pushed a commit to nanokatze/quic-go that referenced this issue Jan 31, 2024
nanokatze pushed a commit to nanokatze/quic-go that referenced this issue Feb 1, 2024
nanokatze pushed a commit to nanokatze/quic-go that referenced this issue Feb 1, 2024
nanokatze pushed a commit to nanokatze/quic-go that referenced this issue Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants