[hyper-1.0] Why http2::handshake
has an executor parameter, while http1::handshake
doesn't?
#3181
Unanswered
slinkydeveloper
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Are you asking about the client side, or the server side? The server also needs an executor to handle all concurrent requests on the same connection. This is because multiple requests can come in while a response isn't ready, and so those get treated by new tasks. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Why do clients need it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version
Hyper 1.0-rc3
Description
I've started looking into porting my application to hyper 1.0, and I'm currently going through the hyper 1.0 APIs to understand all the various details. One thing got my attention: why
http2::handshake
gets an executor parameter, whilehttp1::handshake
doesn't? I would expect theConnection
I get out ofhandshake
to be the only task spawned for the tcp connection, handling the http/2 state, but apparently it's not. Following the code I see that this executor is sometimes invoked for implementing the ping pong, right? Or am I missing something else?Anyway, thank you so much for Hyper 1.0!
Beta Was this translation helpful? Give feedback.
All reactions