tokio-rs / tokio-core

I/O primitives and event loop for async I/O in Rust
Apache License 2.0
638 stars 115 forks source link

TCP_KEEPINTVL / TCP_KEEPCNT missing #323

Closed aep closed 6 years ago

aep commented 6 years ago

tokio_core::net::TcpStream::set_keepalive only lets you set TCP_KEEPIDLE, which isn't particularly useful.

resorting to nix::setsockopt over raw_fd works of course, but i suspect people will be confused, since the behavior when not setting TCP_KEEPINTVL is non-obvious, unless you know posix internals.

carllerche commented 6 years ago

Thanks for this. I'm going to close this issue as tokio-core is deprecated, but Tokio generally follows mio's API (which, in turn, follows std). So, since the issue is currently open on the mio repo, this is kind of a "dup".