Skip to content

Instantly share code, notes, and snippets.

@vitrum
Created March 3, 2014 07:05
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 vitrum/9319795 to your computer and use it in GitHub Desktop.
Save vitrum/9319795 to your computer and use it in GitHub Desktop.
var net = require('net');
net.createServer(function (stream) {
stream.write('hello\r\n');
stream.on('end', function () {
stream.end('goodbye\r\n');
});
stream.pipe(stream);
}).listen(7000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment