# HG changeset patch # User Matthew Wild # Date 1259447369 0 # Node ID 73f466054ead1e77d0f616b557cca6f6163fc497 # Parent ce349990bd217d6f0f6471f87726434c191d1d41 verse.client: Add stream:close() diff -r ce349990bd21 -r 73f466054ead client.lua --- 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(""); + end + self.conn:close(); +end +