it-handshake
Create handshakes for binary protocols with iterable streams
Last updated 2 years ago by jacobheun .
Apache-2.0 OR MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install it-handshake 
SYNC missed versions from official npm registry.

it-handshake

codecov CI

Create handshakes for binary protocols with iterable streams

Table of contents

Install

$ npm i it-handshake

Browser <script> tag

Loading this module through a script tag will make it's exports available as ItHandshake in the global namespace.

<script src="https://unpkg.com/it-handshake/dist/index.min.js"></script>

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.

Related

API Docs

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Current Tags

  • 4.1.3                                ...           latest (2 years ago)

12 Versions

  • 4.1.3                                ...           2 years ago
  • 4.1.2                                ...           2 years ago
  • 4.1.1                                ...           2 years ago
  • 4.1.0                                ...           2 years ago
  • 4.0.1                                ...           2 years ago
  • 4.0.0                                ...           2 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (5)

© 2010 - cnpmjs.org x YWFE | Home | YWFE