Skip to content

jcrugzz/buffr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buffr

A sorta proper Duplex stream useful for piping into, duplicating and destroying. The reason this exists is because there is some weird timing issue in how back pressure is handled preventing bl from handling the case of being piped into and then piped somewhere else. This is super apparent when dealing with requests.

var http = require('http');
var buffr = require('buffr');

//
// While this is not very useful, this will actually work and we will store the
// request in the `buf` stream if we need to duplicate and repipe.
//
http.createServer(function (req, res) {
  var buf = req.pipe(buffr())
  buf.pipe(res);
}).listen(3000);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published