Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Buffered stream
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.gitignore
.travis.yml
LICENSE
README.md
package.json

README.md

buffered Build Status

buffered stream is a implementation of a buffered stream, heavily based on @mikeal's morestreams.

Installation

npm install buffered

Usage

var fs = require('fs'),
    http = require('http'),
    BufferedStream = require('buffered').BufferedStream;

http.createServer(function (req, res) {
  var buffer = new BufferedStream();
  req.pipe(buffer);
  setTimeout(function () {
    buffer.pipe(fs.createWriteStream('req'));
  }, 500);
}).listen(8000);
Something went wrong with that request. Please try again.