Duplex stream is a stream that combines
Writable functionality. A good example of a duplex stream is a TCP socket connection. You can read and write from the socket connection once it has been created.
To implement your own custom
Duplex stream object you will need to first inherit the functionality for
Duplex streams. The simplest way to do that is to use the following code that uses the
Share this highlighthttp://www.safaribooksonline.com/a/nodejs-mongodb-and/53552/