Skip to content

Support HTTP/2 WebSockets - #110

Merged
pgjones merged 1 commit into
python-hyper:masterfrom
pgjones:master
Mar 10, 2019
Merged

pgjones merged 1 commit into
python-hyper:masterfrom
pgjones:master

Conversation

@pgjones

@pgjones pgjones commented Mar 3, 2019 •

Copy link
Copy Markdown
Member

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.

Comment thread wsproto/connection.py Outdated
raise RemoteProtocolError("Error in HTTP/2 data")
else:
for event in events:
if isinstance(event, h2.events.DataReceived):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to handle any other h2 events? ping-pong?
Raise an error on unexpected events?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you just delete basically 95% of this PR - or did the force-push mess something up?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@pgjones

pgjones commented Mar 10, 2019

Copy link
Copy Markdown
Member Author

@Kriechi Is your review approval still valid (since I reduced the scope a lot)?

@Kriechi

Kriechi commented Mar 10, 2019

Copy link
Copy Markdown
Member

I just reviewed it again - yes.

Please update the PR description as well.

@pgjones
pgjones merged commit 3a678e8 into python-hyper:master Mar 10, 2019
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