Skip to content

Commit 8ce6950

Browse files
Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options.
1 parent 96054b6 commit 8ce6950

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
## [0.18.0] - 26 July 2020
1313
### Added
14+
- Added `TCP_KEEPCNT` and `TCP_KEEPINTVL` TCP keepalive options.
15+
(#[1283](https://github.com/nix-rust/nix/pull/1283))
1416
- Added `fchown(2)` wrapper.
1517
(#[1257](https://github.com/nix-rust/nix/pull/1257))
1618
- Added support on linux systems for `MAP_HUGE_`_`SIZE`_ family of flags.

src/sys/socket/sockopt.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ sockopt_impl!(Both, TcpKeepAlive, libc::IPPROTO_TCP, libc::TCP_KEEPALIVE, u32);
252252
target_os = "linux",
253253
target_os = "nacl"))]
254254
sockopt_impl!(Both, TcpKeepIdle, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, u32);
255+
sockopt_impl!(Both, TcpKeepCount, libc::IPPROTO_TCP, libc::TCP_KEEPCNT, u32);
256+
sockopt_impl!(Both, TcpKeepInterval, libc::IPPROTO_TCP, libc::TCP_KEEPINTVL, u32);
255257
sockopt_impl!(Both, RcvBuf, libc::SOL_SOCKET, libc::SO_RCVBUF, usize);
256258
sockopt_impl!(Both, SndBuf, libc::SOL_SOCKET, libc::SO_SNDBUF, usize);
257259
#[cfg(any(target_os = "android", target_os = "linux"))]

0 commit comments

Comments
 (0)