relibc/header/netinet_tcp/mod.rs
1//! `netinet/tcp.h` implementation.
2//!
3//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_tcp.h.html>.
4
5use crate::platform::types::c_int;
6
7/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_tcp.h.html>.
8///
9/// Avoid coalescing of small segments.
10pub const TCP_NODELAY: c_int = 1;
11/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/tcp.7.html>.
12///
13/// The maximum segment size for outgoing TCP packets.
14pub const TCP_MAXSEG: c_int = 2;
15/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/tcp.7.html>.
16///
17/// The time (in seconds) the connection needs to remain idle before TCP starts
18/// sending keepalive probes, if the socket option `SO_KEEPALIVE` has been set
19/// on this socket.
20pub const TCP_KEEPIDLE: c_int = 4;
21/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/tcp.7.html>.
22///
23/// The time (in seconds) between individual keepalive probes.
24pub const TCP_KEEPINTVL: c_int = 5;
25/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/tcp.7.html>.
26///
27/// The maximum number of keepalive probes TCP should send before dropping the
28/// connection.
29pub const TCP_KEEPCNT: c_int = 6;