server.setTimeout([msecs][, callback])


用于设置 HTTP2 安全服务器请求的超时时间,并设置一个回调函数,当 Http2SecureServermsecs 毫秒后没有活动时会被调用。

【Used to set the timeout value for http2 secure server requests, and sets a callback function that is called when there is no activity on the Http2SecureServer after msecs milliseconds.】

给定的回调被注册为 'timeout' 事件的监听器。

【The given callback is registered as a listener on the 'timeout' event.】

如果 callback 不是一个函数,将抛出一个新的 ERR_INVALID_ARG_TYPE 错误。

【In case if callback is not a function, a new ERR_INVALID_ARG_TYPE error will be thrown.】