Comparison

net/server_select.lua @ 5197:beffe931b3b6

net.server_select: Better names for config options (thanks MattJ)
author Kim Alvefur <zash@zash.se>
date Fri, 23 Nov 2012 01:51:30 +0100
parent 4983:4fd6a020d0d8
child 5279:e8f7962056f5
comparison
equal deleted inserted replaced
5195:ce5d7538ac48 5197:beffe931b3b6
747 747
748 changesettings = function( new ) 748 changesettings = function( new )
749 if type( new ) ~= "table" then 749 if type( new ) ~= "table" then
750 return nil, "invalid settings table" 750 return nil, "invalid settings table"
751 end 751 end
752 _selecttimeout = tonumber( new.timeout ) or _selecttimeout 752 _selecttimeout = tonumber( new.select_timeout ) or _selecttimeout
753 _sleeptime = tonumber( new.sleeptime ) or _sleeptime 753 _sleeptime = tonumber( new.select_sleep_time ) or _sleeptime
754 _maxsendlen = tonumber( new.maxsendlen ) or _maxsendlen 754 _maxsendlen = tonumber( new.max_send_buffer_size ) or _maxsendlen
755 _maxreadlen = tonumber( new.maxreadlen ) or _maxreadlen 755 _maxreadlen = tonumber( new.max_receive_buffer_size ) or _maxreadlen
756 _checkinterval = tonumber( new.checkinterval ) or _checkinterval 756 _checkinterval = tonumber( new.select_idle_check_interval ) or _checkinterval
757 _sendtimeout = tonumber( new.sendtimeout ) or _sendtimeout 757 _sendtimeout = tonumber( new.send_timeout ) or _sendtimeout
758 _readtimeout = tonumber( new.readtimeout ) or _readtimeout 758 _readtimeout = tonumber( new.read_timeout ) or _readtimeout
759 _cleanqueue = new.cleanqueue 759 _cleanqueue = new.select_clean_queue
760 _maxclientsperserver = new._maxclientsperserver or _maxclientsperserver 760 _maxclientsperserver = new.max_connections or _maxclientsperserver
761 _maxsslhandshake = new._maxsslhandshake or _maxsslhandshake 761 _maxsslhandshake = new.max_ssl_handshake_roundtrips or _maxsslhandshake
762 return true 762 return true
763 end 763 end
764 764
765 addtimer = function( listener ) 765 addtimer = function( listener )
766 if type( listener ) ~= "function" then 766 if type( listener ) ~= "function" then