diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/http2.md | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md index 640776f5e8..7a4fbf56e5 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1865,7 +1865,9 @@ added: v8.4.0 The `'unknownProtocol'` event is emitted when a connecting client fails to negotiate an allowed protocol (i.e. HTTP/2 or HTTP/1.1). The event handler receives the socket for handling. If no listener is registered for this event, -the connection is terminated. See the [Compatibility API][]. +the connection is terminated. A timeout may be specified using the +`'unknownProtocolTimeout'` option passed to [`http2.createSecureServer()`][]. +See the [Compatibility API][]. #### server.close([callback]) <!-- YAML @@ -1901,6 +1903,9 @@ error will be thrown. <!-- YAML added: v8.4.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs-private/node-private/pull/248 + description: Added `unknownProtocolTimeout` option with a default of 10000. - version: v10.21.0 pr-url: https://github.com/nodejs-private/node-private/pull/204 description: Added `maxSettings` option with a default of 32. @@ -1981,6 +1986,10 @@ changes: `Http2ServerResponse` class to use. Useful for extending the original `Http2ServerResponse`. **Default:** `Http2ServerResponse`. + * `unknownProtocolTimeout` {number} Specifies a timeout in milliseconds that + a server should wait when an [`'unknownProtocol'`][] is emitted. If the + socket has not been destroyed by that time the server will destroy it. + **Default:** `10000`. * `onRequestHandler` {Function} See [Compatibility API][] * Returns: {Http2Server} @@ -2016,6 +2025,9 @@ server.listen(80); <!-- YAML added: v8.4.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs-private/node-private/pull/248 + description: Added `unknownProtocolTimeout` option with a default of 10000. - version: v10.21.0 pr-url: https://github.com/nodejs-private/node-private/pull/204 description: Added `maxSettings` option with a default of 32. @@ -2090,6 +2102,10 @@ changes: servers, the identity options (`pfx` or `key`/`cert`) are usually required. * `origins` {string[]} An array of origin strings to send within an `ORIGIN` frame immediately following creation of a new server `Http2Session`. + * `unknownProtocolTimeout` {number} Specifies a timeout in milliseconds that + a server should wait when an [`'unknownProtocol'`][] event is emitted. If + the socket has not been destroyed by that time the server will destroy it. + **Default:** `10000`. * `onRequestHandler` {Function} See [Compatibility API][] * Returns: {Http2SecureServer} @@ -2123,6 +2139,9 @@ server.listen(80); <!-- YAML added: v8.4.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs-private/node-private/pull/248 + description: Added `unknownProtocolTimeout` option with a default of 10000. - version: v10.21.0 pr-url: https://github.com/nodejs-private/node-private/pull/204 description: Added `maxSettings` option with a default of 32. @@ -2194,6 +2213,10 @@ changes: instance passed to `connect` and the `options` object, and returns any [`Duplex`][] stream that is to be used as the connection for this session. * ...: Any [`net.connect()`][] or [`tls.connect()`][] options can be provided. + * `unknownProtocolTimeout` {number} Specifies a timeout in milliseconds that + a server should wait when an [`'unknownProtocol'`][] event is emitted. If + the socket has not been destroyed by that time the server will destroy it. + **Default:** `10000`. * `listener` {Function} * Returns: {ClientHttp2Session} |