Software /
code /
prosody
Comparison
net/multiplex_listener.lua @ 3137:463d51ee9a2b
net.multiplex_listener: Call listener.onconnect(conn) when swapping listeners.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 02 Jun 2010 17:06:23 +0500 |
parent | 2351:f8d002090cea |
child | 3138:d6151c9a6f7e |
comparison
equal
deleted
inserted
replaced
3136:9630cb97cd3e | 3137:463d51ee9a2b |
---|---|
29 listener = xmppcomponent_listener; | 29 listener = xmppcomponent_listener; |
30 else | 30 else |
31 listener = xmppclient_listener; | 31 listener = xmppclient_listener; |
32 end | 32 end |
33 conn:setlistener(listener); | 33 conn:setlistener(listener); |
34 listener.onconnect(conn); | |
34 listener.onincoming(conn, buf); | 35 listener.onincoming(conn, buf); |
35 elseif #buf > 1024 then | 36 elseif #buf > 1024 then |
36 conn:close(); | 37 conn:close(); |
37 else | 38 else |
38 buffer[conn] = buf; | 39 buffer[conn] = buf; |