Skip to content

How to set TCP SO_KEEPALIVE? #718

Closed
Closed
@Ryan-Git

Description

@Ryan-Git
No description provided.

Activity

yoshuawuyts

yoshuawuyts commented on Mar 6, 2020

@yoshuawuyts
Contributor

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

Ryan-Git commented on Mar 6, 2020

@Ryan-Git
Author

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @yoshuawuyts@Ryan-Git

        Issue actions

          How to set TCP SO_KEEPALIVE? · Issue #718 · async-rs/async-std