Skip to content

Commit 0d066c3

Browse files
bors[bot]nox
andauthored
Merge #1457
1457: Add TcpUserTimeout socket option r=asomers a=nox Co-authored-by: Anthony Ramine <nox@nox.paris>
2 parents 58deca5 + 2e84b63 commit 0d066c3

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
@@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1010
(#[1447](https://github.com/nix-rust/nix/pull/1447))
1111
- Added `IpFreebind` socket option (sockopt) on Linux, Fuchsia and Android.
1212
(#[1456](https://github.com/nix-rust/nix/pull/1456))
13+
- Added `TcpUserTimeout` socket option (sockopt) on Linux and Fuchsia.
14+
(#[1457](https://github.com/nix-rust/nix/pull/1457))
1315

1416
### Changed
1517
### Fixed

src/sys/socket/sockopt.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ sockopt_impl!(Both, TcpKeepIdle, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, u32);
261261
sockopt_impl!(Both, TcpKeepCount, libc::IPPROTO_TCP, libc::TCP_KEEPCNT, u32);
262262
#[cfg(not(target_os = "openbsd"))]
263263
sockopt_impl!(Both, TcpKeepInterval, libc::IPPROTO_TCP, libc::TCP_KEEPINTVL, u32);
264+
#[cfg(any(target_os = "fuchsia", target_os = "linux"))]
265+
sockopt_impl!(Both, TcpUserTimeout, libc::IPPROTO_TCP, libc::TCP_USER_TIMEOUT, u32);
264266
sockopt_impl!(Both, RcvBuf, libc::SOL_SOCKET, libc::SO_RCVBUF, usize);
265267
sockopt_impl!(Both, SndBuf, libc::SOL_SOCKET, libc::SO_SNDBUF, usize);
266268
#[cfg(any(target_os = "android", target_os = "linux"))]

0 commit comments

Comments
 (0)