Software /
code /
prosody
Diff
net/xmppcomponent_listener.lua @ 2129:fcdcdf00787c
*_listener: Update for new net.server API, specifically .listener -> .onincoming, .disconnect -> .ondisconnect
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Nov 2009 04:43:46 +0000 |
parent | 2077:e33658f6052c |
child | 2135:2119a5d603d8 |
line wrap: on
line diff
--- a/net/xmppcomponent_listener.lua Sun Nov 22 04:42:47 2009 +0000 +++ b/net/xmppcomponent_listener.lua Sun Nov 22 04:43:46 2009 +0000 @@ -118,12 +118,12 @@ end session.send("</stream:stream>"); session.conn.close(); - component_listener.disconnect(session.conn, "stream error"); + component_listener.ondisconnect(session.conn, "stream error"); end end --- Component connlistener -function component_listener.listener(conn, data) +function component_listener.onincoming(conn, data) local session = sessions[conn]; if not session then local _send = conn.write; @@ -157,7 +157,7 @@ end end -function component_listener.disconnect(conn, err) +function component_listener.ondisconnect(conn, err) local session = sessions[conn]; if session then (session.log or log)("info", "component disconnected: %s (%s)", tostring(session.host), tostring(err));