-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 5 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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,22 @@ 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.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 secure 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. | ||
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.
|
||
|
||
In case of no callback were assigned, a new `ERR_INVALID_CALLBACK` error will be throw. | ||
|
||
#### server.close([callback]) | ||
<!-- YAML | ||
|
@@ -1728,6 +1744,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 | ||
|
@@ -1739,6 +1756,21 @@ 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][]. | ||
|
||
#### 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 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. | ||
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.
|
||
|
||
In case of no callback were assigned, a new `ERR_INVALID_CALLBACK` error will be throw. | ||
|
||
#### server.close([callback]) | ||
<!-- 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.
Section headings are ABC-sorted, so this and the next added headings need to be placed after the
#### server.close([callback])
.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.
If an error is thrown if no callback is assigned, should we make the
callback
parameter in both signatures mandatory?