diff --git a/doc/api/http2.md b/doc/api/http2.md index 69252121f71daf..0e7d47e14fdcec 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1797,9 +1797,28 @@ on the `Http2Server` after `msecs` milliseconds. The given callback is registered as a listener on the `'timeout'` event. -In case of no callback function were assigned, a new `ERR_INVALID_CALLBACK` +In case if `callback` is not a function, a new `ERR_INVALID_CALLBACK` error will be thrown. +#### `server.timeout` + + +* {number} Timeout in milliseconds. **Default:** 0 (no timeout) + +The number of milliseconds of inactivity before a socket is presumed +to have timed out. + +A value of `0` will disable the timeout behavior on incoming connections. + +The socket timeout logic is set up on connection, so changing this +value only affects new connections to the server, not any existing connections. + ### Class: `Http2SecureServer` + +* {number} Timeout in milliseconds. **Default:** 0 (no timeout) + +The number of milliseconds of inactivity before a socket is presumed +to have timed out. + +A value of `0` will disable the timeout behavior on incoming connections. + +The socket timeout logic is set up on connection, so changing this +value only affects new connections to the server, not any existing connections. + ### `http2.createServer(options[, onRequestHandler])`