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


用于设置 http2 安全服务器请求的超时值,设置 msecs 毫秒后 Http2SecureServer 上没有活动时调用的回调函数。

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

如果 callback 不是函数,则会抛出新的 ERR_INVALID_CALLBACK 错误。

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.

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

In case if callback is not a function, a new ERR_INVALID_CALLBACK error will be thrown.