diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index bdd709f7e27..5bc9e19fc9e 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -164,6 +164,8 @@ readable.on('readable', function() { Once the internal buffer is drained, a `readable` event will fire again when more data is available. +The `readable` event is not emitted in the "flowing" mode with the sole exception of the last one, on end-of-stream. + #### Event: 'data' * `chunk` {Buffer | String} The chunk of data. @@ -182,6 +184,8 @@ readable.on('data', function(chunk) { }) ``` +Note that `'readable'` event should not be used together with `'data'`, because the assigning the latter switches the stream into the "flowing" mode, so the `'readable'` event will not emitted. + #### Event: 'end' This event fires when there will be no more data to read.