Skip to content

Instantly share code, notes, and snippets.

@rf
Created June 26, 2012 01:03
Show Gist options
  • Save rf/2992421 to your computer and use it in GitHub Desktop.
Save rf/2992421 to your computer and use it in GitHub Desktop.
var sock = require('net').createConnection(process.argv[3], process.argv[2]);
sock.on('connect', function () {
process.stdin.pipe(sock);
});
sock.on('data', function (data) {
console.log(data.toString());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment