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