Created
May 3, 2013 16:59
-
-
Save themasch/5511254 to your computer and use it in GitHub Desktop.
Just a quick scribble..
This file contains hidden or 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 stream = new StreamThingy() | |
| stream.transform = myCrazyFormater | |
| io.sockets.on('connection', function(socket) { | |
| stream.add(socket) | |
| }) | |
| stream.pipe(process.stdout) | |
| // // // | |
| // stream works in object mode | |
| // the fransform object receives an object which contains the sending stream and the received message | |
| // every message emited by the transformer is passed to all clients execpt the sending one | |
| // // // |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment