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

stabilize TcpStream::set_keepalive #1126

Closed
wants to merge 1 commit into from

Conversation

seanmonstar
Copy link
Contributor

Stabilize the TcpSteram::set_keepalive() method as fn set_keepalive(&self, dur: Duration) -> io::Result<()>.

Rendered

use.

Passing a `Duration` of zero would be equivalent to turning `SO_KEEPALIVE` off,
since no OS docs mention allowing a value of `0`.
Copy link
Member

Choose a reason for hiding this comment

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

The timeout RFC has been adjusted to use Option<Duration>, so this RFC should probably do that as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Listed in Alternatives.

@alexcrichton
Copy link
Member

cc https://internals.rust-lang.org/t/pre-rfc-std-net-expansion-refinement/2079, a pre-RFC to take a comprehensive look at all of our socket options we have.

@nrc nrc added the T-libs-api Relevant to the library API team, which will review and decide on the RFC. label May 21, 2015
@alexcrichton alexcrichton self-assigned this Jun 11, 2015
@alexcrichton
Copy link
Member

Thanks again for the RFC @seanmonstar, and sorry for taking awhile to get back to this! I've now opened an RFC to reconsider a large number of socket options as a whole, and keepalive is included, so I'm going to close this in favor of that RFC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants