diff options
author | Kim Alvefur <zash@zash.se> | 2022-07-27 08:40:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 09:40:18 +0300 |
commit | d1ad8160cba9e504c9d17665492044a93efdc3ab (patch) | |
tree | f1fdc54ab108383324765104d08c35d09764839a /src/tcp.c | |
parent | 0c7df119c2b71bed814db7b3da8fc379131433fe (diff) | |
download | luasocket-d1ad8160cba9e504c9d17665492044a93efdc3ab.tar.gz luasocket-d1ad8160cba9e504c9d17665492044a93efdc3ab.tar.bz2 luasocket-d1ad8160cba9e504c9d17665492044a93efdc3ab.zip |
feat(tcp): Add support for TCP Defer Accept
This makes it so that a listening socket does not become readable for
accept() until a connection has been fully established *and* started
sending something, thus the program doesn't have to wait for the first
data. This only makes sense for client-speaks-first protocols.
Co-authored-by: Caleb Maclennan <caleb@alerque.com>
Diffstat (limited to 'src/tcp.c')
-rw-r--r-- | src/tcp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -109,6 +109,9 @@ static t_opt optset[] = { | |||
109 | {"linger", opt_set_linger}, | 109 | {"linger", opt_set_linger}, |
110 | {"recv-buffer-size", opt_set_recv_buf_size}, | 110 | {"recv-buffer-size", opt_set_recv_buf_size}, |
111 | {"send-buffer-size", opt_set_send_buf_size}, | 111 | {"send-buffer-size", opt_set_send_buf_size}, |
112 | #ifdef TCP_DEFER_ACCEPT | ||
113 | {"tcp-defer-accept", opt_set_tcp_defer_accept}, | ||
114 | #endif | ||
112 | #ifdef TCP_FASTOPEN | 115 | #ifdef TCP_FASTOPEN |
113 | {"tcp-fastopen", opt_set_tcp_fastopen}, | 116 | {"tcp-fastopen", opt_set_tcp_fastopen}, |
114 | #endif | 117 | #endif |