Skip to content

Commit b459adb

Browse files
committed
feat(server): add Builder::http1_keepalive method
1 parent 1e8cd5a commit b459adb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/server/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,14 @@ impl<I> Builder<I> {
177177
}
178178
}
179179

180+
/// Sets whether to use keep-alive for HTTP/1 connections.
181+
///
182+
/// Default is `true`.
183+
pub fn http1_keepalive(mut self, val: bool) -> Self {
184+
self.protocol.keep_alive(val);
185+
self
186+
}
187+
180188
/// Sets whether HTTP/1 is required.
181189
///
182190
/// Default is `false`.

0 commit comments

Comments
 (0)