duplex-to-multiplex
Multiplex an existing duplex stream
Install
$ npm install duplex-to-multiplex
Usage
'use strict' var net = var duplexToMultiplex = var server = net server
API
duplexToMultiplex(stream, callback, options)
stream: DuplexStream callback: Function options: Object
The given callback returns a stream capable of adding additional streams. See example for more details.
You can also specify an end
function on the options
object to notify you if either underlying duplex stream has ended.
{ // handle stream cleanup }
TODO
- More Tests
License
MIT