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