Sat, 28 Nov 2009 22:29:29 +0000
verse.client: Add stream:close()
client.lua | file | annotate | diff | comparison | revisions |
--- a/client.lua Sat Nov 28 22:29:09 2009 +0000 +++ b/client.lua Sat Nov 28 22:29:29 2009 +0000 @@ -65,3 +65,10 @@ self:send(st.stanza("stream:stream", { to = self.host, ["xmlns:stream"]='http://etherx.jabber.org/streams', xmlns = "jabber:client" }):top_tag()); end +function stream:close(reason) + if not self.notopen then + self:send("</stream:stream>"); + end + self.conn:close(); +end +