Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@markdaws
Created February 13, 2012 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markdaws/1812063 to your computer and use it in GitHub Desktop.
Save markdaws/1812063 to your computer and use it in GitHub Desktop.
network sample
var http = require('http');
function makeRequests() {
for(var i=0; i<100; ++i) {
http.request({
host: '127.0.0.1',
port: 8080,
method: 'GET'
}, function(res) {
// do something with the response
}).end();
}
}
makeRequests();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment