plugins/mod_c2s.lua
changeset 13213 c8d949cf6b09
parent 13099 1693bd4de283
child 13217 50324f66ca2a
equal deleted inserted replaced
13212:a7c6ea1c5308 13213:c8d949cf6b09
    23 
    23 
    24 local xmlns_xmpp_streams = "urn:ietf:params:xml:ns:xmpp-streams";
    24 local xmlns_xmpp_streams = "urn:ietf:params:xml:ns:xmpp-streams";
    25 
    25 
    26 local log = module._log;
    26 local log = module._log;
    27 
    27 
    28 local c2s_timeout = module:get_option_number("c2s_timeout", 300);
    28 local c2s_timeout = module:get_option_period("c2s_timeout", "5 minutes");
    29 local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5);
    29 local stream_close_timeout = module:get_option_period("c2s_close_timeout", 5);
    30 local opt_keepalives = module:get_option_boolean("c2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true));
    30 local opt_keepalives = module:get_option_boolean("c2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true));
    31 local stanza_size_limit = module:get_option_number("c2s_stanza_size_limit", 1024*256);
    31 local stanza_size_limit = module:get_option_number("c2s_stanza_size_limit", 1024*256);
    32 
    32 
    33 local measure_connections = module:metric("gauge", "connections", "", "Established c2s connections", {"host", "type", "ip_family"});
    33 local measure_connections = module:metric("gauge", "connections", "", "Established c2s connections", {"host", "type", "ip_family"});
    34 
    34