Created
February 17, 2014 19:30
-
-
Save KevinGimbel/9057281 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 net = require('net'); | |
var server = net.createServer(function (c) { | |
console.log('server connected'); | |
c.on('end', function() { | |
console.log('server disconnected'); | |
}); | |
c.write('Hello World!'); | |
c.pipe(c); | |
}); | |
server.listen(1337, function() { | |
console.log('server bound to 1337...'); | |
}); |
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
# The output I get in my shell | |
$ node backend.js | |
server bound to 1337... | |
server connected | |
server connected | |
events.js:72 | |
throw er; // Unhandled 'error' event | |
^ | |
Error: read ECONNRESET | |
at errnoException (net.js:901:11) | |
at TCP.onread (net.js:556:19) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment