Hey guys, I've read up on previous posts, but I'm still left scratching my head a little when it comes to the finer details of the additional streams superset.
In particular, the docs says of the read method : If size bytes are not available, then it will return null. [1] This isn't what I'm experiencing at all, for instance, when I'm doing var res = someReadableStream(); > res.on('readable', function () { > var chunk; > while( (chunk = res.read(20)) !== null) { > console.log(chunk+''); > } > }); The whole stream is read 20 bytes at a time, and then the last few bytes (say 10) are also output at the end instead of the expected null. 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? Best, Dave [1] http://nodejs.org/api/stream.html#stream_readable_read_size_1 -- -- 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 nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com 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 nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.