Software /
code /
verse
Comparison
client.lua @ 76:927167321283
verse.client: Fire 'ready' event on stream when resource binding or session negotiation is complete, hook this instead of binding-success
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 30 May 2010 02:49:02 +0100 |
parent | 70:36d113fb0f3c |
child | 78:f4188eff53a7 |
comparison
equal
deleted
inserted
replaced
75:f5ac4e39e84f | 76:927167321283 |
---|---|
95 end | 95 end |
96 end | 96 end |
97 return ret; | 97 return ret; |
98 end, -1); | 98 end, -1); |
99 | 99 |
100 local function stream_ready() | |
101 self:event("ready"); | |
102 end | |
103 self:hook("session-success", stream_ready, -1) | |
104 self:hook("binding-success", stream_ready, -1); | |
105 | |
100 -- Initialise connection | 106 -- Initialise connection |
101 self:connect(self.connect_host or self.host, self.connect_port or 5222); | 107 self:connect(self.connect_host or self.host, self.connect_port or 5222); |
102 self:reopen(); | 108 self:reopen(); |
103 end | 109 end |
104 | 110 |