JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7303
  • Score
    100M100P100Q128067F
  • License MIT

Create handshakes for binary protocols with iterable streams.

Package Exports

  • it-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 (it-handshake) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

it-handshake

Build Status dependencies Status JavaScript Style Guide

Create handshakes for binary protocols with iterable streams.

Install

npm install it-handshake

Usage

See ./example.js

API

handshake(duplex)

Returns a new handshake instance that produces BufferList objects.

shake.write(message)

  • message: String|Buffer|BufferList

shake.read()

Returns the next BufferList message in the stream.

shake.rest()

Ends the writer. This is necessary for continuing to pipe data through shake.stream

shake.stream

The duplex iterable stream to be used once the handshake is complete.

shake.reader

The underyling it-reader used by shake.read(). While direct usage of the reader is typically unnecessary, it is available for advanced usage.

shake.writer

The underyling writer, it-pushable, used by shake.write(). While direct usage of the writer is typically unnecessary, it is available for advanced usage.

License

MIT © Jacob Heun