Node.js and piping a ConnectionListener Node.js and piping a ConnectionListener node.js node.js

Node.js and piping a ConnectionListener


c1.pipe(c2); is a short version for

c1.on('data', function(buf) { c2.write(buf); });

(plus 'drain' event handling, pause/resume etc - see docs)

So c.pipe(c) means 'echo data sent to c'.