首页 > 其他 > 详细

node readable stream 数据读取方式

时间:2015-04-14 02:02:12      阅读:294      评论:0      收藏:0      [点我收藏+]

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

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.

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.


node的request的数据就是从这里来的。

node readable stream 数据读取方式

原文:http://my.oschina.net/u/214483/blog/400780

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!