-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
TCP_NODELAY on client #1473
Comments
There's no super easy way currently. You could make a connector that wraps the I'd be fine with this being an option on |
Thanks, I came up with this wrapper for now: pub struct HttpNoDelayConnector(HttpConnector);
impl Service for HttpNoDelayConnector {
type Request = Uri;
type Response = TcpStream;
type Error = io::Error;
type Future = Box<Future<Item=Self::Response, Error=Self::Error>>;
fn call(&self, uri: Uri) -> Self::Future {
Box::new(self.0.call(uri).and_then(|s| {
s.set_nodelay(true)?;
Ok(s)
}))
}
} Will see if I can put together a pull request to set this directly on |
seanmonstar
added
A-client
Area: client.
E-easy
Effort: easy. A task that would be a great starting point for a new contributor.
labels
Mar 28, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can I set nodelay on an HTTP client connection? If it's not exposed by hyper, can I get access to the underlying
TcpStream
so I can callTcpStream::set_nodelay
?The text was updated successfully, but these errors were encountered: