2009-09-21 12:32:36 +01:00
|
|
|
// Update the local timeline from a Meteor server
|
2009-07-10 17:57:38 +01:00
|
|
|
|
|
|
|
var MeteorUpdater = function()
|
|
|
|
{
|
2009-09-23 16:08:12 +01:00
|
|
|
return {
|
2009-07-10 17:57:38 +01:00
|
|
|
|
2014-08-18 20:59:25 +01:00
|
|
|
init: function(server, port, scheme, timeline)
|
2009-09-23 16:08:12 +01:00
|
|
|
{
|
|
|
|
Meteor.callbacks["process"] = function(data) {
|
2009-09-23 16:08:35 +01:00
|
|
|
RealtimeUpdate.receive(JSON.parse(data));
|
2009-09-23 16:08:12 +01:00
|
|
|
};
|
2009-07-10 17:57:38 +01:00
|
|
|
|
2009-09-23 16:08:12 +01:00
|
|
|
Meteor.host = server;
|
|
|
|
Meteor.port = port;
|
2014-08-18 20:59:25 +01:00
|
|
|
Meteor.scheme = scheme;
|
2009-09-23 16:08:12 +01:00
|
|
|
Meteor.joinChannel(timeline, 0);
|
|
|
|
Meteor.connect();
|
|
|
|
}
|
|
|
|
}
|
2009-07-10 17:57:38 +01:00
|
|
|
}();
|
|
|
|
|