事件:'close'
¥Event: 'close'
发生以下情况之一时会触发 'close'
事件:
¥The 'close'
event is emitted when one of the following occur:
-
rl.close()
方法被调用,readline.Interface
实例放弃了对input
和output
流的控制;¥The
rl.close()
method is called and thereadline.Interface
instance has relinquished control over theinput
andoutput
streams; -
input
流接收到它的'end'
事件;¥The
input
stream receives its'end'
event; -
input
流接收 Ctrl+D 以表示传输结束(EOT);¥The
input
stream receives Ctrl+D to signal end-of-transmission (EOT); -
input
流接收 Ctrl+C 来向SIGINT
触发信号,并且readline.Interface
实例上没有注册'SIGINT'
事件监听器。¥The
input
stream receives Ctrl+C to signalSIGINT
and there is no'SIGINT'
event listener registered on thereadline.Interface
instance.
调用监听器函数时不传入任何参数。
¥The listener function is called without passing any arguments.
一旦触发 'close'
事件,则 readline.Interface
实例就完成了。
¥The readline.Interface
instance is finished once the 'close'
event is
emitted.