Comparison

net/xmppserver_listener.lua @ 990:235abebc896e

xmppserver_listener: Add session:close() method to outgoing s2s connections too
author Matthew Wild <mwild1@gmail.com>
date Sun, 12 Apr 2009 02:55:49 +0100
parent 974:82f7261c0482
child 1040:4c79b28bce64
comparison
equal deleted inserted replaced
989:ec239c044f31 990:235abebc896e
147 147
148 function xmppserver.register_outgoing(conn, session) 148 function xmppserver.register_outgoing(conn, session)
149 session.direction = "outgoing"; 149 session.direction = "outgoing";
150 sessions[conn] = session; 150 sessions[conn] = session;
151 151
152 session.reset_stream = session_reset_stream; 152 session.reset_stream = session_reset_stream;
153 session.close = session_close;
153 session_reset_stream(session); -- Initialise, ready for use 154 session_reset_stream(session); -- Initialise, ready for use
154 155
155 --local function handleerr(err) print("Traceback:", err, debug.traceback()); end 156 --local function handleerr(err) print("Traceback:", err, debug.traceback()); end
156 --session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end 157 --session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end
157 end 158 end