On Saturday, October 26, 2013 4:42:33 PM UTC-4, Dave Clements wrote:
>
> For my use case this behaviour is preferred, but I'm wondering why its not 
> acting like the docs 
> say, or am I misunderstanding something?
>
>
The docs do need to be updated to note this. The reason is that if the 
stream is ended and you've asked to read 1 or more bytes and there is 
something left in the buffer, it will return that number of bytes to be 
read[1]. If however the stream hasn't ended, then you will get null as you 
expect.

[1] 
https://github.com/joyent/node/blob/v0.10/lib/_stream_readable.js#L240-L246

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to