aboutsummaryrefslogtreecommitdiff
path: root/src/tcp.c
diff options
context:
space:
mode:
authorVictor Seva <linuxmaniac@torreviejawireless.org>2014-12-05 13:17:50 +0100
committerVictor Seva <linuxmaniac@torreviejawireless.org>2014-12-05 13:17:50 +0100
commit2906d6a5227df25f14305c373fdde057f388d363 (patch)
tree2f76f59323008656a23830f0efc9c3d3aff95774 /src/tcp.c
parent5edf093643cceb329392aec9606ab3988579b821 (diff)
downloadluasocket-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.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tcp.c b/src/tcp.c
index 6594bda..3af9a39 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -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}