Skip to content

Quick questions about using Hyper with HTTP/2 #3442

Answered by seanmonstar
OldMansKid asked this question in Q&A
Discussion options

You must be logged in to vote

I assume that in HTTP/2, a single Service's call() function will be called with requests from all HTTP/2 streams, and cloning an http2::SendRequest will open a new stream, am I right?

Not quite. In HTTP/2, sending any request will always result in a new stream. The reason the http1::SendRequest isn't Clone is because an HTTP/1 connection cannot send new requests until the previous one has finished. Whereas http2::SendRequest can be cloned to send multiple requests at the same time. (The Clone call doesn't create a new stream. It's the send_request() call.)

HTTP/2 pseudo headers

Most of them are translated to http types, either pieces of the Uri, or the StatusCode.

frames like sending…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by OldMansKid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants