Skip to content

Commit 767a8c5

Browse files
Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options.
1 parent bf77f50 commit 767a8c5

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
@@ -17,6 +17,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1717

1818
## [0.18.0] - 26 July 2020
1919
### Added
20+
- Added `TCP_KEEPCNT` and `TCP_KEEPINTVL` TCP keepalive options.
21+
(#[1283](https://github.com/nix-rust/nix/pull/1283))
2022
- Added `fchown(2)` wrapper.
2123
(#[1257](https://github.com/nix-rust/nix/pull/1257))
2224
- 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)