-
Notifications
You must be signed in to change notification settings - Fork 29
Support for custom TLS port + optional verify peer - #37
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was meant to be a default context, which would be sensible without requiring the user to figure out what various switches do. That said, I'm not opposed to having a helper that offers more customization, without callers having to figure out how to build raw SslContexts.
Would you mind renaming this method to something like build_context and then implementing the original build_default_context in terms of that?
mlalic
commented
Apr 12, 2017
Thanks for the PR!
This seems like a few definite quality of life improvements. I just had one minor comment, that'd be great if you could address.
rohitjoshi
commented
Apr 12, 2017
@mlalic thanks. I have addressed the review comments. Let me know if you recommend any other changes.
Flow ctrl Support
Uh oh!
There was an error while loading. Please reload this page.
I have added support for following two features.