node.js - Does a readable start reading before a writable emits "writable"? -


let's want read in 1gb file uploaded network endpoint. issue is, before making network upload request, have make network request token allow upload go through.

so, if someone's code looked like...

fs.createreadstream('1-gb-file').pipe(mywritablestream); 

...should worried data buffering in memory before writestream says it's ready (after having fetched token)?

what i've found fs.createreadstream readable has highwatermark of 64kb. mean max in-buffer limit 64kb, before more data sucked out of readable?

will data start being read (beyond highwatermark) readable after call this.emit('writable') (or other trigger)? edit: maybe trigger calling callback first call _write receives?

i'm quite new streams api, appreciated. i've searched around similar questions, , couldn't find any. sad face.

thanks!


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -