HttpServer
HttpServiceHandler
HSHR
State
Dispatcher
Tokio
HttpServiceHandlerResponse
eventually build...
H1::Dispatcher::new()
State::H1(Dispatcher)
State::H2Handshake
alt
[ Protocol::HTTP1 ]
[ Protocol::HTTP2 ]
HttpServiceHandlerResponse::new(State)
StreamService->Tokio::spawn(HttpServiceHandlerResponse as Future)
poll()
H2::Dispatcher::new(stream,services)
poll()
poll()
alt
[ State::H2Handshake ]
requests loop
HttpServer
HttpServiceHandler
HSHR
State
Dispatcher
Tokio