-
-
Save anonymous/e59d2fc4b4b360fbeb61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Socket = require('net').Socket; | |
var http = require('http'); | |
var i = 0; | |
http.createServer(function(req, res) { | |
if (i < 150) { | |
var s = new Socket(); | |
s.once('connect', function() { | |
console.log('connected!'); | |
}); | |
s.connect(3000, 'localhost'); | |
i++; | |
} | |
res.end(); | |
}).listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment