事件:'timeout'
【Event: 'timeout'】
在使用 http2session.setTimeout() 方法为此 Http2Session 设置超时时间后,如果在配置的毫秒数内 Http2Session 没有任何活动,就会触发 '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', () => { /* .. */ });