Comparison

plugins/mod_net_multiplex.lua @ 13213:50324f66ca2a

plugins: Use integer config API with interval specification where sensible Many of these fall into a few categories: - util.cache size, must be >= 1 - byte or item counts that logically can't be negative - port numbers that should be in 1..0xffff
author Kim Alvefur <zash@zash.se>
date Mon, 17 Jul 2023 01:38:54 +0200
parent 12977:74b9e05af71e
comparison
equal deleted inserted replaced
13212:3e6e98cc63e9 13213:50324f66ca2a
1 module:set_global(); 1 module:set_global();
2 2
3 local array = require "prosody.util.array"; 3 local array = require "prosody.util.array";
4 local max_buffer_len = module:get_option_number("multiplex_buffer_size", 1024); 4 local max_buffer_len = module:get_option_integer("multiplex_buffer_size", 1024, 1);
5 local default_mode = module:get_option_number("network_default_read_size", 4096); 5 local default_mode = module:get_option_integer("network_default_read_size", 4096, 0);
6 6
7 local portmanager = require "prosody.core.portmanager"; 7 local portmanager = require "prosody.core.portmanager";
8 8
9 local available_services = {}; 9 local available_services = {};
10 local service_by_protocol = {}; 10 local service_by_protocol = {};