码迷,mamicode.com
首页 > 其他好文 > 详细

node readable stream 数据读取方式

时间:2015-04-14 02:02:44      阅读:171      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!