Software /
code /
prosody
Comparison
net/server_event.lua @ 2534:1f46a9d9b16a
net.server_event: Support :setlistener() method on connections to work with port multiplexing
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 29 Jan 2010 16:46:28 +0000 |
parent | 2478:7be72eca5666 |
child | 2535:75bb31b6c53f |
comparison
equal
deleted
inserted
replaced
2533:d6ca46b834d9 | 2534:1f46a9d9b16a |
---|---|
424 return self.conn:setoption(option, value); | 424 return self.conn:setoption(option, value); |
425 end | 425 end |
426 return false, "setoption not implemented"; | 426 return false, "setoption not implemented"; |
427 end | 427 end |
428 | 428 |
429 function interface_mt:setlistener(listener) | |
430 self.onconnect, self.ondisconnect, self.onincoming, self.ontimeout | |
431 = listener.onconnect, listener.ondisconnect, listener.onincoming, listener.ontimeout; | |
432 end | |
433 | |
429 -- Stub handlers | 434 -- Stub handlers |
430 function interface_mt:onconnect() | 435 function interface_mt:onconnect() |
431 end | 436 end |
432 function interface_mt:onincoming() | 437 function interface_mt:onincoming() |
433 end | 438 end |