Add tcp_nodelay for Builder

This commit is contained in:
quininer
2019-03-19 11:56:45 +08:00
committed by Sean McArthur
parent f5e7e883c7
commit 47640170bb
3 changed files with 43 additions and 22 deletions

View File

@@ -84,6 +84,11 @@ impl ClientBuilder {
})
}
/// Set that all sockets have `SO_NODELAY` set to `true`.
pub fn tcp_nodelay(self) -> ClientBuilder {
self.with_inner(move |inner| inner.tcp_nodelay())
}
/// Use native TLS backend.
#[cfg(feature = "default-tls")]
pub fn use_default_tls(self) -> ClientBuilder {