Skip to content
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

doc: add parameters for settings events #20371

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions doc/api/http2.md
Expand Up @@ -195,9 +195,10 @@ event is emitted.
added: v8.4.0
-->

* `settings` {Object} A copy of the `SETTINGS` frame received.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should be the {HTTP/2 Settings Object} as in other sections of this doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should! Didn't know that type existed, now I need to write the whole js file. 😛


The `'localSettings'` event is emitted when an acknowledgment `SETTINGS` frame
has been received. When invoked, the handler function will receive a copy of
the local settings.
has been received.

When using `http2session.settings()` to submit new settings, the modified
settings do not take effect until the `'localSettings'` event is emitted.
Expand All @@ -215,9 +216,10 @@ session.on('localSettings', (settings) => {
added: v8.4.0
-->

* `settings` {Object} A copy of the `SETTINGS` frame received.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.


The `'remoteSettings'` event is emitted when a new `SETTINGS` frame is received
from the connected peer. When invoked, the handler function will receive a copy
of the remote settings.
from the connected peer.

```js
session.on('remoteSettings', (settings) => {
Expand Down