lossystream

0.1.0 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i lossystream

Weekly Downloads

1

Version

0.1.0

License

BSD

Last publish

Collaborators

  • tmpvar