Comparison

net/server_select.lua @ 9385:58fe099043ed

net.server: Call a 'onattach' callback when replacing listeners
author Kim Alvefur <zash@zash.se>
date Wed, 26 Sep 2018 14:25:59 +0200
parent 8983:23f66f04e216
child 9387:33e52f727f0f
comparison
equal deleted inserted replaced
9384:5c8006ce8cb8 9385:58fe099043ed
329 disconnect = listeners.ondisconnect 329 disconnect = listeners.ondisconnect
330 status = listeners.onstatus 330 status = listeners.onstatus
331 drain = listeners.ondrain 331 drain = listeners.ondrain
332 handler.onreadtimeout = listeners.onreadtimeout 332 handler.onreadtimeout = listeners.onreadtimeout
333 detach = listeners.ondetach 333 detach = listeners.ondetach
334 if listeners.onattach then
335 listeners.onattach(self)
336 end
334 end 337 end
335 handler.getstats = function( ) 338 handler.getstats = function( )
336 return readtraffic, sendtraffic 339 return readtraffic, sendtraffic
337 end 340 end
338 handler.ssl = function( ) 341 handler.ssl = function( )