You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
yoshuawuyts commentedon Mar 6, 2020
Construct a socket using
socket2
and then convert it into astd::net::TcpStream
and then convert that into anasync_std::net::TcpListener
. Alternativelynet2::TcpStreamExt
provides a similar method as wellThe 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.TcpStream::keepalive
andTcpStream::set_keepalive
rust-lang/rust#69774Ryan-Git commentedon Mar 6, 2020
thanks. Agree with adding it to std. For now I'm OK with socket2..