Google Groups

morestreams: BufferedStream

Marco Rogers Mar 6, 2011 2:04 PM
Posted in group: nodejs

Forked morestreams and updated the test.  The current version doesn't really address the specific issue of buffering data so you can make async calls before piping.  You've got a pull request for that.

I've also got a revamped version of my BufferedStream on this branch.

I killed the PipedState thing and it's now more similar to yours accept it adds a few key things.

- You can go back and forth between buffering and passthrough state. This is important to support the pause/resume scheme of pipe.
- Added flush semantics with flush on resume. In buffer state it buffers everything. When resume is called, the buffer queue is "flushed". It plays back the queue of buffered data in order before going back to passthrough state.

The flush semantics are flawed somehow though.  Either that or the test is flawed because it fails.  Take a look.


Marco Rogers

Forwarded message:

From: Mikeal Rogers <>
Reply To:
Date: Friday, March 4, 2011 10:19:46 PM
Subject: Re: [nodejs] Re: Is Request.pause useless?

Pushed morestreams. morestreams.BufferedStream.

Didn't end up going with Marco's code cause it was too big and complicated for my small brain.

You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at