meteorupdater.js 528 B

12345678910111213141516171819202122
  1. // Update the local timeline from a Meteor server
  2. var MeteorUpdater = function()
  3. {
  4. return {
  5. init: function(server, port, scheme, timeline)
  6. {
  7. Meteor.callbacks["process"] = function(data) {
  8. RealtimeUpdate.receive(JSON.parse(data));
  9. };
  10. Meteor.host = server;
  11. Meteor.port = port;
  12. Meteor.scheme = scheme;
  13. Meteor.joinChannel(timeline, 0);
  14. Meteor.connect();
  15. }
  16. }
  17. }();