事件:'close'
【Event: 'close'】
当发生以下情况之一时,会触发 'close' 事件:
【The 'close' event is emitted when one of the following occur:】
- 调用了
rl.close()方法,并且InterfaceConstructor实例已经放弃对input和output流的控制; input流接收到'end'事件;input流接收到 Ctrl+D 来表示传输结束 (EOT);input流接收到 Ctrl+C 来触发SIGINT,并且在InterfaceConstructor实例上没有注册'SIGINT'事件监听器。
调用监听器函数时不传入任何参数。
【The listener function is called without passing any arguments.】
InterfaceConstructor 实例在触发 'close' 事件后即完成。
【The InterfaceConstructor instance is finished once the 'close' event is
emitted.】