howellzhu

Results 2 comments of howellzhu

Two years have passed, any update on this issue please? Noticed that @hawkw 's commit is closed: [net: expose keepalive configuration on TcpSocket](https://github.com/tokio-rs/tokio/pull/3146) But it seems no indirect solution provided,...

@Darksonn thanks , following safe code can work: ```rust use socket2::{SockRef, TcpKeepalive}; ... info!("connecting to {addr}"); let tcp = TcpStream::connect(&addr).await?; info!("tcp connected to {addr}"); let ka = TcpKeepalive::new().with_time(std::time::Duration::from_secs(30)); let sf...