node readable stream 數據讀取方式

A Readable stream will not start emitting data until you indicate that you are ready to receive it.html

Readable streams have two "modes": a flowing mode and a paused mode. When in flowing mode, data is read from the underlying system and provided to your program as fast as possible. In paused mode, you must explicitly call stream.read() to get chunks of data out. Streams start out in paused mode.node

Note: If no data event handlers are attached, and there are no pipe() destinations, and the stream is switched into flowing mode, then data will be lost.api


node的request的數據就是從這裏來的。ide

相關文章
相關標籤/搜索