-
Notifications
You must be signed in to change notification settings - Fork 56
Get flow control available for streams and connection. #57
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
Comments
I wonder how an application could meaningful respond to congestion / missing flow control credits (or more generally: send buffer full, because that's the moment the write will block), other than giving up. Maybe your real wish is just that writing to a stream never blocks, but throws an exception when the send buffer is full? |
For example, if an application wishes to send 100 bytes but only 50 bytes of flow control credit is available, the application can choose to either
This is mainly coming from the perspective of writing multiplayer games, where blocking a thread that runs the main game loop is unacceptable, but blocking threads which send resources such as textures or whatnot is okay. |
Hi, That flow control allows sending 50 bytes still doesn't mean they will be sent immediately; sending is still subject to congestion control. If your main concern is that the thread should not block, I would guess a method that tells how much space is left in the send buffer would be more helpfull. However, given the context of a multiplayer game: did you consider to use https://www.rfc-editor.org/rfc/rfc9221.html? Seems a better fit, because it won't resend data that probably has become stale anyway. The big advantage of this extension is that you can combine normal (guaranteed) stream traffic with (not-guaranteed) datagram data. Hth, |
Ah okay, was not sure how it was implemented but this:
Makes sense. Also, I do know about the unreliable extension, my current goal is to add a layer on top of quic so I can create both reliable and unreliable channels (with only datagrams allowed for unreliable channels). |
Uh oh!
There was an error while loading. Please reload this page.
Feature Request: Create an API to figure out how many bytes of flow control a stream and connection have.
This can allow the user to actually detect and respond to congestion instead of just having the application threads block.
The text was updated successfully, but these errors were encountered: