send packets into the void when backpressured
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
index.js
package.json
test.js

README.md

#lossy stream

This simple readable/writable stream drops writes when in a paused state.

npm install lossystream

usage

var lossy = require('lossystream');

var dropped = function(d) {
 // d contains the data that was dropped
};

someStream.pipe(lossy().on('drop', dropped)).pipe(slowStream);

why?

I'm using this to push images (640x480) to the browser over binary websockets. The browser freezes if I try to send this much data 30 times a second.