事件:'close'
【Event: 'close'】
'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.】
如果使用 emitClose 选项创建 Readable 流,它总是会发出 'close' 事件。
【A Readable stream will always emit the 'close' event if it is
created with the emitClose option.】