diff options
author | Victor Seva <linuxmaniac@torreviejawireless.org> | 2014-12-05 13:17:50 +0100 |
---|---|---|
committer | Victor Seva <linuxmaniac@torreviejawireless.org> | 2014-12-05 13:17:50 +0100 |
commit | 2906d6a5227df25f14305c373fdde057f388d363 (patch) | |
tree | 2f76f59323008656a23830f0efc9c3d3aff95774 /src/tcp.c | |
parent | 5edf093643cceb329392aec9606ab3988579b821 (diff) | |
download | luasocket-2906d6a5227df25f14305c373fdde057f388d363.tar.gz luasocket-2906d6a5227df25f14305c373fdde057f388d363.tar.bz2 luasocket-2906d6a5227df25f14305c373fdde057f388d363.zip |
Add "tcp-keepidle", "tcp-keepcnt" and "tcp-keepintvl" options
Diffstat (limited to 'src/tcp.c')
-rw-r--r-- | src/tcp.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -72,6 +72,15 @@ static t_opt optget[] = { | |||
72 | {"keepalive", opt_get_keepalive}, | 72 | {"keepalive", opt_get_keepalive}, |
73 | {"reuseaddr", opt_get_reuseaddr}, | 73 | {"reuseaddr", opt_get_reuseaddr}, |
74 | {"tcp-nodelay", opt_get_tcp_nodelay}, | 74 | {"tcp-nodelay", opt_get_tcp_nodelay}, |
75 | #ifdef TCP_KEEPIDLE | ||
76 | {"tcp-keepidle", opt_get_tcp_keepidle}, | ||
77 | #endif | ||
78 | #ifdef TCP_KEEPCNT | ||
79 | {"tcp-keepcnt", opt_get_tcp_keepcnt}, | ||
80 | #endif | ||
81 | #ifdef TCP_KEEPINTVL | ||
82 | {"tcp-keepintvl", opt_get_tcp_keepintvl}, | ||
83 | #endif | ||
75 | {"linger", opt_get_linger}, | 84 | {"linger", opt_get_linger}, |
76 | {"error", opt_get_error}, | 85 | {"error", opt_get_error}, |
77 | {NULL, NULL} | 86 | {NULL, NULL} |
@@ -81,6 +90,15 @@ static t_opt optset[] = { | |||
81 | {"keepalive", opt_set_keepalive}, | 90 | {"keepalive", opt_set_keepalive}, |
82 | {"reuseaddr", opt_set_reuseaddr}, | 91 | {"reuseaddr", opt_set_reuseaddr}, |
83 | {"tcp-nodelay", opt_set_tcp_nodelay}, | 92 | {"tcp-nodelay", opt_set_tcp_nodelay}, |
93 | #ifdef TCP_KEEPIDLE | ||
94 | {"tcp-keepidle", opt_set_tcp_keepidle}, | ||
95 | #endif | ||
96 | #ifdef TCP_KEEPCNT | ||
97 | {"tcp-keepcnt", opt_set_tcp_keepcnt}, | ||
98 | #endif | ||
99 | #ifdef TCP_KEEPINTVL | ||
100 | {"tcp-keepintvl", opt_set_tcp_keepintvl}, | ||
101 | #endif | ||
84 | {"ipv6-v6only", opt_set_ip6_v6only}, | 102 | {"ipv6-v6only", opt_set_ip6_v6only}, |
85 | {"linger", opt_set_linger}, | 103 | {"linger", opt_set_linger}, |
86 | {NULL, NULL} | 104 | {NULL, NULL} |