Merge pull request #116 from linuxmaniac/master
Add "tcp-keepidle", "tcp-keepcnt" and "tcp-keepintvl" options
This commit is contained in:
commit
699c36c019
5 changed files with 81 additions and 1 deletions
18
src/tcp.c
18
src/tcp.c
|
@ -77,6 +77,15 @@ static t_opt optget[] = {
|
|||
{"reuseaddr", opt_get_reuseaddr},
|
||||
{"reuseport", opt_get_reuseport},
|
||||
{"tcp-nodelay", opt_get_tcp_nodelay},
|
||||
#ifdef TCP_KEEPIDLE
|
||||
{"tcp-keepidle", opt_get_tcp_keepidle},
|
||||
#endif
|
||||
#ifdef TCP_KEEPCNT
|
||||
{"tcp-keepcnt", opt_get_tcp_keepcnt},
|
||||
#endif
|
||||
#ifdef TCP_KEEPINTVL
|
||||
{"tcp-keepintvl", opt_get_tcp_keepintvl},
|
||||
#endif
|
||||
{"linger", opt_get_linger},
|
||||
{"error", opt_get_error},
|
||||
{NULL, NULL}
|
||||
|
@ -87,6 +96,15 @@ static t_opt optset[] = {
|
|||
{"reuseaddr", opt_set_reuseaddr},
|
||||
{"reuseport", opt_set_reuseport},
|
||||
{"tcp-nodelay", opt_set_tcp_nodelay},
|
||||
#ifdef TCP_KEEPIDLE
|
||||
{"tcp-keepidle", opt_set_tcp_keepidle},
|
||||
#endif
|
||||
#ifdef TCP_KEEPCNT
|
||||
{"tcp-keepcnt", opt_set_tcp_keepcnt},
|
||||
#endif
|
||||
#ifdef TCP_KEEPINTVL
|
||||
{"tcp-keepintvl", opt_set_tcp_keepintvl},
|
||||
#endif
|
||||
{"ipv6-v6only", opt_set_ip6_v6only},
|
||||
{"linger", opt_set_linger},
|
||||
{NULL, NULL}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue