hyper-util
hyper-util copied to clipboard
Common utilities used with hyper.
Closes https://github.com/hyperium/hyper/issues/3511 This PR adds an option to choose http1 or http2 only for auto connections.
Depends on https://github.com/hyperium/hyper/pull/3591. Related to #79. Allows uses to use service utilities without enabling features which are not used.
Replaces `SyncWrapper` with `sync_wrapper`'s one. This crate is used by a lot of crates.
Closes https://github.com/hyperium/hyper/issues/2862 Adds a GracefulShutdown utility which: - is runtime agnostic - can work with any future - respects the API as requested in the feature request issue (#2862), taken...
I didn't realize the auto connection was ready to be used with a `!Send` executor, so I went down a long [rabbit hole](https://github.com/hyperium/hyper/issues/3624). This adds an example hopefully short-circuiting this...
The motivation is I wanted a way to get back to the main `Builder`, and this seemed to do it. Does it make sense? cc @davidpdrsn @programatik29
Depends on https://github.com/hyperium/hyper/pull/3591. This is a breaking change. Uses `server-auto` feature to enable server-auto implementation to treat dependencies finely same as client and client-legacy do.
This change simplifies API and removes duplicate code. Closes pull request #92 and #93.
Because `Http1Builder::serve_connection` and `Http2Builder::serve_connection` didn't return `Connection` it was impossible to use them in combination with `Connection::graceful_shutdown`. By returning the Connection future rather than awaiting it, this becomes possible.