Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

it-pb-rpc

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-pb-rpc

A convenience-wrapper around protocol-buffers and lp-messages functions

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

it-pb-rpc

A convinience-wrapper arround protocol-buffers and lp-messages functions

API

  • wrap(duplex, opts): Wraps a duplex, returns below object (opts=Object with encode/decode opts from it-length-prefixed api)
    • .read(bytes): async, reads the given amount of bytes
    • .readLP(): async, reads one length-prefixed message
    • .readPB(proto): async, reads one protocol-buffers length-prefixed message (proto=Object with .encode, .decode functions)
    • .write(data): writes the given data (data=Buffer or BufferList)
    • .writeLP(data): writes the given data with a length-prefixe (data=Buffer or BufferList)
    • .writePB(data, proto): encodes the data, then writes it withg a length-prefix (data=Buffer or BufferList, proto=Object with .encode, .decode functions)
    • .pb(proto): returns a convinience wrapper for writing messages
      • .read(): reads one length-prefixed message encoded with proto
      • .write(data): writes one length-prefixed message encoded with proto

FAQs

Package last updated on 03 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc