note about todo
authorDominqique Hazael-Massieux <dom@w3.org>
Thu, 01 Sep 2011 16:11:31 +0200
changeset 222 14c23b5c82db
parent 221 de7170820279
child 223 a813b90b2412
note about todo
node.js/twitter.js
--- a/node.js/twitter.js	Thu Sep 01 16:06:49 2011 +0200
+++ b/node.js/twitter.js	Thu Sep 01 16:11:31 2011 +0200
@@ -71,7 +71,10 @@
 
 exports.listenToTweets = function(emitter, twitter_ids, twitter_auth)  {
     var stream = https.request(
-	{host: 'stream.twitter.com', path:'/1/statuses/filter.json', 'method': 'POST'}, 
+	{
+	    host: 'stream.twitter.com'
+	    // host: 'localhost', port: 3030
+	 , path:'/1/statuses/filter.json', 'method': 'POST'}, 
 	function (res) {
 	    res.setEncoding('utf8');
 	    var incompleteChunk = "";
@@ -95,6 +98,7 @@
 		function () {
 		    console.log("Twitter stream terminated with error " + res.statusCode);
 		    console.log(JSON.stringify(res.headers));
+		    // @@@ retry connection but with rate regulation
 		});
 	}
     );