summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYoav Steinberg <yoav@monfort.co.il>2020-08-03 10:14:19 +0300
committerYoav Steinberg <yoav@monfort.co.il>2020-10-10 23:51:57 +0300
commitfde7181f93a97595bcaf49e138933502c8027c9b (patch)
treef7c10a61d327bc60ab6581b9783a0f632bc48613 /src
parent566e2d7dad025c9b2bef98115b584328c145675d (diff)
downloadnix-fde7181f93a97595bcaf49e138933502c8027c9b.zip
Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options.
Diffstat (limited to 'src')
-rw-r--r--src/sys/socket/sockopt.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs
index cbdf6691..e41a472a 100644
--- a/src/sys/socket/sockopt.rs
+++ b/src/sys/socket/sockopt.rs
@@ -252,6 +252,8 @@ sockopt_impl!(Both, TcpKeepAlive, libc::IPPROTO_TCP, libc::TCP_KEEPALIVE, u32);
target_os = "linux",
target_os = "nacl"))]
sockopt_impl!(Both, TcpKeepIdle, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, u32);
+sockopt_impl!(Both, TcpKeepCount, libc::IPPROTO_TCP, libc::TCP_KEEPCNT, u32);
+sockopt_impl!(Both, TcpKeepInterval, libc::IPPROTO_TCP, libc::TCP_KEEPINTVL, u32);
sockopt_impl!(Both, RcvBuf, libc::SOL_SOCKET, libc::SO_RCVBUF, usize);
sockopt_impl!(Both, SndBuf, libc::SOL_SOCKET, libc::SO_SNDBUF, usize);
#[cfg(any(target_os = "android", target_os = "linux"))]