Software /
code /
verse
Comparison
client.lua @ 12:73f466054ead
verse.client: Add stream:close()
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 28 Nov 2009 22:29:29 +0000 |
parent | 11:ce349990bd21 |
child | 13:c3d83b98fb4f |
comparison
equal
deleted
inserted
replaced
11:ce349990bd21 | 12:73f466054ead |
---|---|
63 function stream:reopen() | 63 function stream:reopen() |
64 reset_stream(self); | 64 reset_stream(self); |
65 self:send(st.stanza("stream:stream", { to = self.host, ["xmlns:stream"]='http://etherx.jabber.org/streams', xmlns = "jabber:client" }):top_tag()); | 65 self:send(st.stanza("stream:stream", { to = self.host, ["xmlns:stream"]='http://etherx.jabber.org/streams', xmlns = "jabber:client" }):top_tag()); |
66 end | 66 end |
67 | 67 |
68 function stream:close(reason) | |
69 if not self.notopen then | |
70 self:send("</stream:stream>"); | |
71 end | |
72 self.conn:close(); | |
73 end | |
74 |