
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
Cable is incredibly fast binary encoded JSON requests over a stream in Node.js with pipelining support
Cable is incredibly fast binary encoded JSON requests over a stream in Node.js with pipelining support. It's available through npm:
npm install cable
Cable is especially useful for fast communication between processes and servers. All JSON messages are sent with a 5 byte header that descripes the type and length of a message. This allows for extremely easy and fast parsing.
Usage is simple. Start a server:
var net = require('net');
var cable = require('cable');
var server = net.createServer(function(socket) {
var c = cable();
c.on('message', function(message, callback) {
// lets just echo
callback(null, {echo:message});
});
socket.pipe(c).pipe(socket); // setup the pipe chain
});
server.listen(8080);
Do a request:
var socket = net.connect(8080);
var c = cable();
socket.pipe(c).pipe(socket);
c.send({hello:'world'}, function(err, message) {
console.log(message); // prints echo
});
c.send({hello:'verden'}, function(err, message) {
console.log(message); // prints echo again
});
When you do a request c.send(message, [cb]) cable sends the message and pushes the callback to a response stack. If a new request is made to the same stream in the meantime cable will just send that right away and pipeline the request to minimize latency. Omit the callback to not wait for a response.
cable() -> c instantiate a new cable duplex stream
c.send(message, [cb]) send a message. add the callback if you want a response
c.on('message', message, cb) emitted when a message is received. cb is noop if no callback was used in send
c.destroy() destroy the stream. calls all missing callbacks with an error
MIT
FAQs
Cable is a fast and simple binary request/response protocol stream for Node.js
The npm package cable receives a total of 55 weekly downloads. As such, cable popularity was classified as not popular.
We found that cable 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.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.