'close' 事件


当流及其任何底层资源(例如文件描述符)已关闭时,则会触发 'close' 事件。 该事件表明将不再触发更多事件,并且不会发生进一步的计算。

如果 Readable 流是使用 emitClose 选项创建的,则始终会触发 'close' 事件。

The 'close' event is emitted when the stream and any of its underlying resources (a file descriptor, for example) have been closed. The event indicates that no more events will be emitted, and no further computation will occur.

A Readable stream will always emit the 'close' event if it is created with the emitClose option.