Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(server): polish server connection docs #3325

Merged

Conversation

oddgrd
Copy link
Contributor

@oddgrd oddgrd commented Sep 24, 2023

This PR aims to address some of the tasks in #3067, specifically:

conn module: mention hyper-util providing an AutoConnection and builder

struct conn::http1::Connection: Explain that this is returned from Builder::serve_connection, and that it is essential an impl Future that must be polled (or awaited) for anything to happen.

The change in service is to make it an automatic link, which was suggested by cargo doc.

The changes have been tested by running cargo doc --features "server,http1,client,http2" --open and inspecting the docs.

Feedback on phrasing or if anything should be expanded on is most welcome!

Comment on lines +11 to +15
//! If your server needs to support both versions, an auto-connection builder is
//! provided in the [`hyper-util`](https://github.com/hyperium/hyper-util/tree/master)
//! crate. This builder wraps the HTTP/1 and HTTP/2 connection builders from this
//! module, allowing you to set configuration for both. The builder will then check
//! the version of the incoming connection and serve it accordingly.
Copy link
Contributor Author

@oddgrd oddgrd Sep 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should link to the hyper-util crates.io page when it's released. Perhaps we should open an issue for creating an auto-connection example in hyper-util as well?

@seanmonstar seanmonstar merged commit 96d54b1 into hyperium:master Sep 28, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants