Software /
code /
prosody
Comparison
net/server_select.lua @ 9387:33e52f727f0f
net.connect: Fix passing request table to new listener
This could be a return value from ondetach
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Sep 2018 17:36:53 +0200 |
parent | 9385:58fe099043ed |
child | 9473:5fdda751333a |
comparison
equal
deleted
inserted
replaced
9386:0f395d82b4ea | 9387:33e52f727f0f |
---|---|
319 handler.disconnect = function( ) | 319 handler.disconnect = function( ) |
320 return disconnect | 320 return disconnect |
321 end | 321 end |
322 handler.onreadtimeout = onreadtimeout; | 322 handler.onreadtimeout = onreadtimeout; |
323 | 323 |
324 handler.setlistener = function( self, listeners ) | 324 handler.setlistener = function( self, listeners, data ) |
325 if detach then | 325 if detach then |
326 detach(self) -- Notify listener that it is no longer responsible for this connection | 326 detach(self) -- Notify listener that it is no longer responsible for this connection |
327 end | 327 end |
328 dispatch = listeners.onincoming | 328 dispatch = listeners.onincoming |
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 | 334 if listeners.onattach then |
335 listeners.onattach(self) | 335 listeners.onattach(self, data) |
336 end | 336 end |
337 end | 337 end |
338 handler.getstats = function( ) | 338 handler.getstats = function( ) |
339 return readtraffic, sendtraffic | 339 return readtraffic, sendtraffic |
340 end | 340 end |