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 |