Repository navigation
Support HTTP/2 WebSockets - #110
Conversation
| raise RemoteProtocolError("Error in HTTP/2 data") | ||
| else: | ||
| for event in events: | ||
| if isinstance(event, h2.events.DataReceived): |
There was a problem hiding this comment.
Do we need to handle any other h2 events? ping-pong?
Raise an error on unexpected events?
There was a problem hiding this comment.
Your right it should. I've looked at doing so and I don't think wsproto can, instead I think we should limit ourselves to the unmanaged case. The biggest problem is what to do if a window updated event is received. I've updated this pull request with this in mind.
There was a problem hiding this comment.
Did you just delete basically 95% of this PR - or did the force-push mess something up?
There was a problem hiding this comment.
I did delete most of this, the approach didn't work.
This only includes helper functions for the handshake phase. This is because the HTTP/2 connection must be managed alongside the chosen I/O (in order for the flow control to work). The recommendation is to use the Hyper-h2 library with wsproto. In order to support h2 client extension handshakes the handshake_extensions function has been renamed.
|
@Kriechi Is your review approval still valid (since I reduced the scope a lot)? |
|
I just reviewed it again - yes. Please update the PR description as well. |
This only includes helper functions for the handshake phase. This is
because the HTTP/2 connection must be managed alongside the chosen I/O
(in order for the flow control to work). The recommendation is to use
the Hyper-h2 library with wsproto.
In order to support h2 client extension handshakes the
handshake_extensions function has been renamed.
See #109 and #102 for previous discussion.