Skip to content

Instantly share code, notes, and snippets.

@KevinGimbel
Created February 17, 2014 19:30
Show Gist options
  • Save KevinGimbel/9057281 to your computer and use it in GitHub Desktop.
Save KevinGimbel/9057281 to your computer and use it in GitHub Desktop.
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...');
});
# 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