Comparison

net/server_epoll.lua @ 9665:4790d1b88919 0.11

server_epoll: Add comments describing config options
author Kim Alvefur <zash@zash.se>
date Fri, 30 Nov 2018 19:40:39 +0100
parent 9664:9e40ff07555c
child 9666:270216874740
child 9821:7712488c8e49
comparison
equal deleted inserted replaced
9664:9e40ff07555c 9665:4790d1b88919
33 33
34 local _ENV = nil; 34 local _ENV = nil;
35 -- luacheck: std none 35 -- luacheck: std none
36 36
37 local default_config = { __index = { 37 local default_config = { __index = {
38 -- If a connection is silent for this long, close it unless onreadtimeout says not to
38 read_timeout = 14 * 60; 39 read_timeout = 14 * 60;
40
41 -- How long to wait for a socket to become writable after queuing data to send
39 write_timeout = 60; 42 write_timeout = 60;
43
44 -- Some number possibly influencing how many pending connections can be accepted
40 tcp_backlog = 128; 45 tcp_backlog = 128;
46
47 -- If accepting a new incoming connection fails, wait this long before trying again
41 accept_retry_interval = 10; 48 accept_retry_interval = 10;
49
50 -- If there is still more data to read from LuaSocktes buffer, wait this long and read again
42 read_retry_delay = 1e-06; 51 read_retry_delay = 1e-06;
52
53 -- Size of chunks to read from sockets
43 read_size = 8192; 54 read_size = 8192;
55
56 -- Timeout used during between steps in TLS handshakes
44 handshake_timeout = 60; 57 handshake_timeout = 60;
58
59 -- Maximum and minimum amount of time to sleep waiting for events (adjusted for pending timers)
45 max_wait = 86400; 60 max_wait = 86400;
46 min_wait = 1e-06; 61 min_wait = 1e-06;
47 }}; 62 }};
48 local cfg = default_config.__index; 63 local cfg = default_config.__index;
49 64