Node.js Readable Stream end Event
The ‘end’ Event in a Readable Stream is emitted when there is no available data to be consumed from the readable stream. And the ‘end’ event won’t be emitted if the data is not fully consumed. It can be done by switching the stream into the flowing mode, or by calling stream.read() method again and again until all the data is being consumed.
Below examples illustrate the use of end event in Node.js:
Done... read: GeeksforGeeks All the data is being consumed.
Here, all the data is not consumed as stream.read() method is not called so the end event is not emitted here.
My Personal Notes arrow_drop_up
Please Login to comment...