Skip to content

Commit c28473d

Browse files
oddgrdseanmonstar
authored andcommitted
docs(server): suggest hyper-util autoconnection util
1 parent 6951466 commit c28473d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/server/conn/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
//! are not handled at this level. This module provides the building blocks to
66
//! customize those things externally.
77
//!
8-
//! This module is split by HTTP version. Both work similarly, but do have
9-
//! specific options on each builder.
8+
//! This module is split by HTTP version, providing a connection builder for
9+
//! each. They work similarly, but they each have specific options.
10+
//!
11+
//! If your server needs to support both versions, an auto connection builder is
12+
//! provided in the [`hyper-util`](https://github.com/hyperium/hyper-util/tree/master)
13+
//! crate. This builder wraps the HTTP/1 and HTTP/2 connection builders from this
14+
//! module, allowing you to set configuration for both. The builder will then check
15+
//! the version of the incoming connection and serve it accordingly.
1016
1117
#[cfg(feature = "http1")]
1218
pub mod http1;

src/service/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ pub trait Service<Request> {
3535
/// - It's clearer that Services can likely be cloned
3636
/// - To share state across clones you generally need Arc<Mutex<_>>
3737
/// that means you're not really using the &mut self and could do with a &self
38-
/// To see the discussion on this see: https://github.com/hyperium/hyper/issues/3040
38+
/// To see the discussion on this see: <https://github.com/hyperium/hyper/issues/3040>
3939
fn call(&self, req: Request) -> Self::Future;
4040
}

0 commit comments

Comments
 (0)