153 if data then |
153 if data then |
154 session.data(conn, data); |
154 session.data(conn, data); |
155 end |
155 end |
156 end |
156 end |
157 |
157 |
158 function xmppserver.status(conn, status) |
158 function xmppserver.onstatus(conn, status) |
159 if status == "ssl-handshake-complete" then |
159 if status == "ssl-handshake-complete" then |
160 local session = sessions[conn]; |
160 local session = sessions[conn]; |
161 if session and session.direction == "outgoing" then |
161 if session and session.direction == "outgoing" then |
162 local format, to_host, from_host = string.format, session.to_host, session.from_host; |
162 local format, to_host, from_host = string.format, session.to_host, session.from_host; |
163 session.log("debug", "Sending stream header..."); |
163 session.log("debug", "Sending stream header..."); |