Google Groups

morestreams: BufferedStream


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

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

-- 
Marco Rogers

Forwarded message:

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

Pushed morestreams. morestreams.BufferedStream.

https://github.com/mikeal/morestreams
http://search.npmjs.org/#/morestreams

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 nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.