it-pb-rpc
A convenience-wrapper around protocol-buffers and lp-messages functions
Last updated 4 years ago by mkg20001 .
MPL-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install it-pb-rpc 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.2.0                                ...           latest (4 years ago)

14 Versions

  • 0.2.0                                ...           4 years ago
  • 0.1.13                                ...           4 years ago
  • 0.1.12                                ...           4 years ago
  • 0.1.11                                ...           5 years ago
  • 0.1.9                                ...           6 years ago
  • 0.1.8                                ...           6 years ago
  • 0.1.7                                ...           6 years ago
  • 0.1.6                                ...           6 years ago
  • 0.1.5                                ...           6 years ago
  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (8)

Copyright 2013 - present © cnpmjs.org | Home |