Re: Overlap between StreamReader and FileReader

The idea did not come from mimicing WebRTC:

- pause/unpause: insert pause in the stream, stop processing the data 
when pause is reached (but don't close the operation, see below), buffer 
next data coming in, restart from pause on unpause

Use case: flow control, window flow control gets empty, wait signal from 
the receiver to reinitialize the window and restart

- stop/resume : different from close, stop: insert a specific eof-stop 
in the stream, the API closes the operation while receiving it, buffer 
data, restart the operation on resume in the state it was before 
receiving eof-stop

It's more tricky, use case is the one I gave before: specific 
progressive hash, close a hash and resume it from the state it was 
before closing it, the feature has been asked several time to node for 

Whether it's "implementable", I don't know, but I don't see why it could 
not be, uses cases are real (myself but I am not the only one)



Le 30/10/2013 12:49, Takeshi Yoshino a écrit :
> On Wed, Oct 30, 2013 at 8:14 PM, Takeshi Yoshino < 
> <>> wrote:
>     On Wed, Oct 23, 2013 at 11:42 PM, Aymeric Vitte
>     < <>> wrote:
>         - pause: pause the stream, do not send eof
>     Sorry, what will be paused? Output?
> So, you're suggesting that we make Stream be a convenient point where 
> we can dam up data flow and skip adding methods to pausing data 
> producing and consuming to producer/consumer APIs? I.e. we make it 
> able to prevent data queued in a Stream from being read. This 
> typically means asynchronously suspending ongoing pipe() or read() 
> call on the Stream with no-argument or very large argument.
>         - unpause: restart the stream
>         And flow control should be back and explicit, not sure right
>         now how to define it but I think it's impossible for a js app
>         to do a precise flow control, and for existing APIs like
>         WebSockets it's not easy to control the flow and avoid in some
>         situations to overload the UA.

Peersm :
node-Tor :
GitHub :

Received on Sunday, 3 November 2013 22:31:35 UTC