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

How to set TCP SO_KEEPALIVE? #718

Closed
Ryan-Git opened this issue Mar 3, 2020 · 2 comments
Closed

How to set TCP SO_KEEPALIVE? #718

Ryan-Git opened this issue Mar 3, 2020 · 2 comments

Comments

@Ryan-Git
Copy link

Ryan-Git commented Mar 3, 2020

No description provided.

@yoshuawuyts
Copy link
Contributor

yoshuawuyts commented Mar 6, 2020

Construct a socket using socket2 and then convert it into a std::net::TcpStream and then convert that into an async_std::net::TcpListener. Alternatively net2::TcpStreamExt provides a similar method as well

The right solution here would be if we had this method exposed directly on std::net::TcpStream, as it's fairly common to want to set this.

@Ryan-Git
Copy link
Author

Ryan-Git commented Mar 6, 2020

thanks. Agree with adding it to std. For now I'm OK with socket2..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants