Comparison

net/xmppclient_listener.lua @ 2107:90751c0ca690

xmppclient_listener: Use : syntax for connection methods, to be compatible with new server.lua
author Matthew Wild <mwild1@gmail.com>
date Sat, 21 Nov 2009 17:15:59 +0000
parent 2106:0737b167a997
child 2129:fcdcdf00787c
comparison
equal deleted inserted replaced
2106:0737b167a997 2107:90751c0ca690
98 session.send(reason); 98 session.send(reason);
99 end 99 end
100 end 100 end
101 end 101 end
102 session.send("</stream:stream>"); 102 session.send("</stream:stream>");
103 session.conn.close(); 103 session.conn:close();
104 xmppclient.disconnect(session.conn, (reason and (reason.text or reason.condition)) or reason or "session closed"); 104 xmppclient.disconnect(session.conn, (reason and (reason.text or reason.condition)) or reason or "session closed");
105 end 105 end
106 end 106 end
107 107
108 108
115 sessions[conn] = session; 115 sessions[conn] = session;
116 116
117 session.log("info", "Client connected"); 117 session.log("info", "Client connected");
118 118
119 -- Client is using legacy SSL (otherwise mod_tls sets this flag) 119 -- Client is using legacy SSL (otherwise mod_tls sets this flag)
120 if conn.ssl() then 120 if conn:ssl() then
121 session.secure = true; 121 session.secure = true;
122 end 122 end
123 123
124 session.reset_stream = session_reset_stream; 124 session.reset_stream = session_reset_stream;
125 session.close = session_close; 125 session.close = session_close;