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