'timeout' 事件
使用 http2session.setTimeout()
方法为此 Http2Session
设置超时时间后,如果在配置的毫秒数后 Http2Session
上没有活动,则触发 'timeout'
事件。
其监听器不需要任何参数。
session.setTimeout(2000);
session.on('timeout', () => { /* .. */ });
After the http2session.setTimeout()
method is used to set the timeout period
for this Http2Session
, the 'timeout'
event is emitted if there is no
activity on the Http2Session
after the configured number of milliseconds.
Its listener does not expect any arguments.
session.setTimeout(2000);
session.on('timeout', () => { /* .. */ });