No description, website, or topics provided.
JavaScript
Switch branches/tags
Nothing to show
Pull request Compare This branch is 5 commits behind dominictarr:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

convoy-stream

A meta-stream for sending multiple streams down a single stream. Like mux-demux except in series instead of in parallel.

<img src=https://secure.travis-ci.org/'Dominic Tarr'/convoy-stream.png?branch=master>

convoy-stream is useful in different cases to mux-demux for example, replicating multiple files down a stream, or packing multiple files into one file.

convoy-stream uses length packed frames, so binary data is also supported!

A Simple Example

var convoy = require('..')
var assert = require('assert')
var es     = require('event-stream')

var c = convoy()
var d = convoy()

var c1 = c.createStream() //push a stream onto the stack.

c1.write('hello')
c1.end()

//pipe the convoys together.
c.pipe(d)

var d1 = d.createStream()
d1.on('data', console.log.bind(console))

License

MIT