Coder Social home page Coder Social logo

it-handshake's Introduction

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/index.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

it-handshake's People

Contributors

achingbrain avatar dependabot[bot] avatar jacobheun avatar semantic-release-bot avatar web3-bot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.