36 |
ifr.p = Meteor.process; |
ifr.p = Meteor.process; |
37 |
ifr.r = Meteor.reset; |
ifr.r = Meteor.reset; |
38 |
ifr.eof = Meteor.eof; |
ifr.eof = Meteor.eof; |
39 |
|
ifr.ch = Meteor.channelInfo; |
40 |
clearTimeout(Meteor.frameloadtimer); |
clearTimeout(Meteor.frameloadtimer); |
41 |
Meteor.setstatus(4); |
Meteor.setstatus(4); |
42 |
Meteor.log("Frame registered"); |
Meteor.log("Frame registered"); |
163 |
Meteor.log("Ping timeout"); |
Meteor.log("Ping timeout"); |
164 |
Meteor.mode="smartpoll"; |
Meteor.mode="smartpoll"; |
165 |
clearTimeout(Meteor.pingtimer); |
clearTimeout(Meteor.pingtimer); |
|
Meteor.connect(); |
|
166 |
Meteor.callbacks["changemode"]("poll"); |
Meteor.callbacks["changemode"]("poll"); |
167 |
Meteor.lastpingtime = false; |
Meteor.lastpingtime = false; |
168 |
|
Meteor.connect(); |
169 |
}, |
}, |
170 |
|
|
171 |
process: function(id, channel, data) { |
process: function(id, channel, data) { |
172 |
if (id == -1) { |
if (id == -1) { |
173 |
Meteor.log("Ping"); |
Meteor.log("Ping"); |
174 |
Meteor.ping(); |
Meteor.ping(); |
175 |
} else if (typeof(Meteor.channels[channel]) != "undefined" && id > Meteor.channels[channel].lastmsgreceived) { |
} else if (typeof(Meteor.channels[channel]) != "undefined") { |
176 |
Meteor.log("Message "+id+" received on channel "+channel+" (last id on channel: "+Meteor.channels[channel].lastmsgreceived+")\n"+data); |
Meteor.log("Message "+id+" received on channel "+channel+" (last id on channel: "+Meteor.channels[channel].lastmsgreceived+")\n"+data); |
177 |
Meteor.callbacks["process"](data); |
Meteor.callbacks["process"](data); |
178 |
Meteor.channels[channel].lastmsgreceived = id; |
Meteor.channels[channel].lastmsgreceived = id; |
208 |
|
|
209 |
eof: function() { |
eof: function() { |
210 |
Meteor.callbacks["eof"](); |
Meteor.callbacks["eof"](); |
211 |
|
Meteor.disconnect(); |
212 |
|
}, |
213 |
|
|
214 |
|
channelInfo: function(channel, id) { |
215 |
|
Meteor.channels[channel].lastmsgreceived = id; |
216 |
|
Meteor.log("Received channel info for channel "+channel+": resume from "+id); |
217 |
}, |
}, |
218 |
|
|
219 |
updatepollfreq: function() { |
updatepollfreq: function() { |
249 |
Meteor.log("Frame load timeout"); |
Meteor.log("Frame load timeout"); |
250 |
if (Meteor.frameloadtimer) clearTimeout(Meteor.frameloadtimer); |
if (Meteor.frameloadtimer) clearTimeout(Meteor.frameloadtimer); |
251 |
Meteor.setstatus(3); |
Meteor.setstatus(3); |
252 |
setTimeout(Meteor.connect, 5000); |
Meteor.pollmode(); |
253 |
}, |
}, |
254 |
|
|
255 |
extract_xss_domain: function(old_domain) { |
extract_xss_domain: function(old_domain) { |