Package Exports
- pull-handshake
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pull-handshake) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pull-handshake
create handshakes for binary protocols with pull streams.
example
var shake = handshake()
//pull some amount of data out of the stream
shake.read(32, function (err, data) {
//write a response...
shake.write(new Buffer('hello there'))
shake.read(32, function (err, data) {
//get a confirmation,
//and then attach the application
var stream = createApplicationStream()
pull(stream, shake.rest(), stream)
//shake.rest() returns a duplex binary stream.
})
})
//shake is itself a duplex pull-stream.
pull(shake, stream, shake)
License
MIT