turtles
Adds stream passing support for dnode callbacks. i use it with dnode on top of shoe. readable/writeable/duplex stream support in one!
For those unfamiliar with dnode. dnode is a really great way to treat your server like a module.
examples
pipe a file
var t1 = ; t2 = ; t2; t2;
todo: shoe/engine.io-stream example
api
the api extends dnode with exactly one method
- turtles.stream()
- returns a duplex stream
- a stream is not cleaned up until both sides close. if you dont use one side it will be closed automatically for you.
- if you only read from this stream and it ends is will close the write side for you and cleanup the stream.
- if you only write from this stream and it ends is will close the read side for you and cleanup the stream.
- you may pass these as data arguments to callbacks
the api reserves the name of one callback _turtles
thanks
@substack for making awesome stuff! and for hopefully giving me permission to use the turtle picture.
inception!
dnode over dnode
var turtles = ; var value; var oneTurtle = var twoTurtle = ; twoTurtle; oneTurtle;