symmetric-protocol-group
multiplex symmetric protocol duplex streams
This is useful if you need to replicate multiple symmetric databases over the same connection.
example
var hyperlog =var memdb =var sym =var log0 =var log1 =var log2 =var log3 ={var pending = 2log0log1{ if --pending === 0 }}
api
var sym =
var stream = sym(streams, cb)
Return a multiplex stream
that bundles an object streams
mapping names to
full-duplex symmetric protocol streams. The other end should include the same
stream names.
cb(err)
fires on errors or when all the streams have finished successfully.
stream.on('stream-close', function (key) {})
When an individual stream closes, this event fires with the stream key
.
install
npm install symmetric-protocol-group
license
BSD