/[meteor]/googlecode.com/svn/trunk/public_html/meteor.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /googlecode.com/svn/trunk/public_html/meteor.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 52 by andrew.betts, Sat Feb 2 16:53:19 2008 UTC revision 53 by andrew.betts, Wed Feb 27 21:58:56 2008 UTC
# Line 36  Meteor = { Line 36  Meteor = {
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");
# Line 162  Meteor = { Line 163  Meteor = {
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;
# Line 207  Meteor = { Line 208  Meteor = {
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() {
# Line 242  Meteor = { Line 249  Meteor = {
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) {

Legend:
Removed from v.52  
changed lines
  Added in v.53

  ViewVC Help
Powered by ViewVC 1.1.26