programatik29 / axum-server

High level server designed to be used with axum framework.
MIT License
166 stars 54 forks source link

New example setting a header read timeout #122

Open josecelano opened 3 days ago

josecelano commented 3 days ago

I'm trying to build an example where the connection is automatically closed after 5 seconds.

It's not working.

I was able to do it directly with hyper with the echo example in the hyper repo.

Here are the changes I made to that example. I guess there must be a way to apply the same changes using axum-server.

In this example, I'm using the hyper_util::rt::TokioTimer. The hyper example uses

https://github.com/josecelano/hyper/blob/master/benches/support/tokiort.rs