Skip to content
Discussion options

You must be logged in to vote

@seanmonstar I've tried to make use of a non static executor, taking example of how the smol crate does it (mostly the prior mentioned smol-axum that does not compile with latest hyper) and the http2 example from here, and got a compiling snippet supposed to spawn an http2 server, but it crashes on any incoming connections. Curling it gives Received HTTP/0.9 when not allowed and my program's output is Error serving connection: http2 error

This is the code

use smol::Async;
use std::borrow::Borrow;
use std::ops::Deref;

use smol::Executor;
use smol_hyper::rt::FuturesIo;
use smol_hyper::rt::SmolTimer;

use std::net::TcpListener;
use std::sync::Arc;

use http_body_util::Full;
use hyper::body::B…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@TuTiuTe
Comment options

@TuTiuTe
Comment options

Answer selected by TuTiuTe
@seanmonstar
Comment options

@TuTiuTe
Comment options

@TuTiuTe
Comment options

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