forked from mlalic/solicit
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Flow ctrl Support #1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows `WindowSize`s to be compared for equality against `i32`s transparently...
… size methods There is no point in coercing the internal `WindowSize` struct into an `i32` before returning it; in fact, this can easily be done by clients if they have such a requirement.
This commit adds two methods to the `Session` trait that allow it to be notified when a new WINDOW_UPDATE frame signals an increase in the outbound window size for both the connection-level, as well as the stream-level windows.
Two new methods are added to the `Session` trait that allow it to receive notice when either the connection-level or a stream-level inbound window size decreases. These calls will, as a rule, always be emitted in pairs by the `HttpConnection` upon parsing a flow-control subject frame (at the moment this is only the DATA frame, as per the HTTP/2 spec).
The state now has an entry per stream, instead of storing just the raw stream. This is in preparation for extending the state to be able to track more stream-related information, that does not belong on the Stream trait itself. (The Stream trait is supposed to be the bridge between the session and its client that is interested only in stream-level events; requiring those clients to also implement tracking various book-keeping stream state is not only redundant---all streams will need to track the same state in the same way---but also not in line with what the Stream trait is supposed to represent.)
The method is used to signal errors that the local peer detects, in contrast to those that the remote signals by sending an RST_STREAM frame. The Session should send the RST_STREAM after the `on_stream_error` is called.
The mod.rs file was getting quite large...
The WindowUpdateStrategy trait is used to define the algorithm for updating the flow control window of both the connection, as well as individual stream. The object is provided the new size of the corresponding window and is expected to produce an action to be taken immediately: either increase the size of the window or do nothing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.