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

Flow ctrl Support #1

Merged
merged 12 commits into from
Apr 18, 2017
Merged

Flow ctrl Support #1

merged 12 commits into from
Apr 18, 2017

Conversation

rohitjoshi
Copy link
Owner

No description provided.

mlalic added 12 commits April 24, 2016 17:47
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants