diff options
author | Diego Nehab <diego.nehab@gmail.com> | 2019-02-24 17:55:27 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-24 17:55:27 -0300 |
commit | 699c36c0193c4c9fb4ae8d90c032280f6bacdaf3 (patch) | |
tree | 568f11832751f7bca69c419c000494256b6b3348 /src/tcp.c | |
parent | f6ba23d463fde40c47862efafb32de231844c099 (diff) | |
parent | 2906d6a5227df25f14305c373fdde057f388d363 (diff) | |
download | luasocket-699c36c0193c4c9fb4ae8d90c032280f6bacdaf3.tar.gz luasocket-699c36c0193c4c9fb4ae8d90c032280f6bacdaf3.tar.bz2 luasocket-699c36c0193c4c9fb4ae8d90c032280f6bacdaf3.zip |
Merge pull request #116 from linuxmaniac/master
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
@@ -77,6 +77,15 @@ static t_opt optget[] = { | |||
77 | {"reuseaddr", opt_get_reuseaddr}, | 77 | {"reuseaddr", opt_get_reuseaddr}, |
78 | {"reuseport", opt_get_reuseport}, | 78 | {"reuseport", opt_get_reuseport}, |
79 | {"tcp-nodelay", opt_get_tcp_nodelay}, | 79 | {"tcp-nodelay", opt_get_tcp_nodelay}, |
80 | #ifdef TCP_KEEPIDLE | ||
81 | {"tcp-keepidle", opt_get_tcp_keepidle}, | ||
82 | #endif | ||
83 | #ifdef TCP_KEEPCNT | ||
84 | {"tcp-keepcnt", opt_get_tcp_keepcnt}, | ||
85 | #endif | ||
86 | #ifdef TCP_KEEPINTVL | ||
87 | {"tcp-keepintvl", opt_get_tcp_keepintvl}, | ||
88 | #endif | ||
80 | {"linger", opt_get_linger}, | 89 | {"linger", opt_get_linger}, |
81 | {"error", opt_get_error}, | 90 | {"error", opt_get_error}, |
82 | {NULL, NULL} | 91 | {NULL, NULL} |
@@ -87,6 +96,15 @@ static t_opt optset[] = { | |||
87 | {"reuseaddr", opt_set_reuseaddr}, | 96 | {"reuseaddr", opt_set_reuseaddr}, |
88 | {"reuseport", opt_set_reuseport}, | 97 | {"reuseport", opt_set_reuseport}, |
89 | {"tcp-nodelay", opt_set_tcp_nodelay}, | 98 | {"tcp-nodelay", opt_set_tcp_nodelay}, |
99 | #ifdef TCP_KEEPIDLE | ||
100 | {"tcp-keepidle", opt_set_tcp_keepidle}, | ||
101 | #endif | ||
102 | #ifdef TCP_KEEPCNT | ||
103 | {"tcp-keepcnt", opt_set_tcp_keepcnt}, | ||
104 | #endif | ||
105 | #ifdef TCP_KEEPINTVL | ||
106 | {"tcp-keepintvl", opt_set_tcp_keepintvl}, | ||
107 | #endif | ||
90 | {"ipv6-v6only", opt_set_ip6_v6only}, | 108 | {"ipv6-v6only", opt_set_ip6_v6only}, |
91 | {"linger", opt_set_linger}, | 109 | {"linger", opt_set_linger}, |
92 | {NULL, NULL} | 110 | {NULL, NULL} |