New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Http2 timeout documentation #22798
Closed
Closed
Http2 timeout documentation #22798
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
93a39e7
Http2 timeout documentation
sagitsofan a47d0ab
backticks
sagitsofan 8d409ce
lower casing
sagitsofan f703eb0
added new section
sagitsofan 30678e9
fix typo
sagitsofan 885ecf9
row max length fix
sagitsofan acda854
typos & order
sagitsofan 5ac898c
added function word
sagitsofan c749d6e
words changing :+1:
sagitsofan File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1615,6 +1615,7 @@ added: v8.4.0 | |
|
||
The `'timeout'` event is emitted when there is no activity on the Server for | ||
a given number of milliseconds set using `http2server.setTimeout()`. | ||
**Default:** 2 minutes. | ||
|
||
#### server.close([callback]) | ||
<!-- YAML | ||
|
@@ -1628,6 +1629,24 @@ Note that this is not analogous to restricting new requests since HTTP/2 | |
connections are persistent. To achieve a similar graceful shutdown behavior, | ||
consider also using [`http2session.close()`] on active sessions. | ||
|
||
#### server.setTimeout([msecs][, callback]) | ||
<!-- YAML | ||
added: v8.4.0 | ||
--> | ||
|
||
* `msecs` {number} **Default:** `120000` (2 minutes) | ||
* `callback` {Function} | ||
* Returns: {Http2Server} | ||
|
||
Used to set the timeout value for http2 server requests, | ||
and sets a callback function that is called when there is no activity | ||
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` | ||
error will be thrown. | ||
|
||
### Class: Http2SecureServer | ||
<!-- YAML | ||
added: v8.4.0 | ||
|
@@ -1728,6 +1747,7 @@ added: v8.4.0 | |
|
||
The `'timeout'` event is emitted when there is no activity on the Server for | ||
a given number of milliseconds set using `http2secureServer.setTimeout()`. | ||
**Default:** 2 minutes. | ||
|
||
#### Event: 'unknownProtocol' | ||
<!-- YAML | ||
|
@@ -1751,6 +1771,24 @@ Note that this is not analogous to restricting new requests since HTTP/2 | |
connections are persistent. To achieve a similar graceful shutdown behavior, | ||
consider also using [`http2session.close()`] on active sessions. | ||
|
||
#### server.setTimeout([msecs][, callback]) | ||
<!-- YAML | ||
added: v8.4.0 | ||
--> | ||
|
||
* `msecs` {number} **Default:** `120000` (2 minutes) | ||
* `callback` {Function} | ||
* Returns: {Http2SecureServer} | ||
|
||
Used to set the timeout value for http2 server requests, | ||
and sets a callback function that is called when there is no activity | ||
on the `Http2Server` after `msecs` milliseconds. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
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` | ||
error will be thrown. | ||
|
||
### http2.createServer(options[, onRequestHandler]) | ||
<!-- YAML | ||
added: v8.4.0 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, in this section,
http2 secure server
seemed appropriate)