2009-07-10 17:57:38 +01:00
|
|
|
// update the local timeline from a Meteor server
|
|
|
|
//
|
|
|
|
|
|
|
|
var MeteorUpdater = function()
|
|
|
|
{
|
|
|
|
return {
|
|
|
|
|
2009-07-14 22:06:29 +01:00
|
|
|
init: function(server, port, timeline)
|
|
|
|
{
|
2009-07-10 17:57:38 +01:00
|
|
|
Meteor.callbacks["process"] = function(data) {
|
2009-07-14 22:06:29 +01:00
|
|
|
RealtimeUpdate.receive(JSON.parse(data));
|
2009-07-10 17:57:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
Meteor.host = server;
|
|
|
|
Meteor.port = port;
|
|
|
|
Meteor.joinChannel(timeline, 0);
|
|
|
|
Meteor.connect();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}();
|
|
|
|
|