
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
protocol-buffers-stream
Advanced tools
Streaming protocol buffers for Node.js
npm install protocol-buffers-stream
Assuming you have the following schema
message Test {
required string hello = 1;
}
Run the following example
var protobufs = require('protocol-buffers-stream')
var fs = require('fs')
var schema = fs.readFileSync('schema.proto')
var createStream = protobufs(schema)
var stream = createStream()
// send a test message
// if your schema message was named example this method would be called example
stream.test({
hello: 'world'
})
// receive a test message
stream.on('test', function(m) {
console.log(m)
})
// just pipe to ourselves for testing
stream.pipe(stream)
Each buffer is sent using the following encoding
----------------------------------------------
| frame length | message id | message buffer |
----------------------------------------------
The first message sent is a handshake message that contains the message ids of the following messages
MIT
FAQs
Streaming protocol buffers for Node.js
The npm package protocol-buffers-stream receives a total of 18 weekly downloads. As such, protocol-buffers-stream popularity was classified as not popular.
We found that protocol-buffers-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.