Skip to content

Commit 119f83b

Browse files
BridgeARtargos
authored andcommitted
doc: mark settings as optional and add callback
The settings are currently not required and the callback was not documented so far. Refs: #26811 PR-URL: #26894 Refs: #26811 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent f50c9c6 commit 119f83b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/api/http2.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,17 @@ Provides miscellaneous information about the current state of the
572572

573573
An object describing the current status of this `Http2Session`.
574574

575-
#### http2session.settings(settings)
575+
#### http2session.settings([settings][, callback])
576576
<!-- YAML
577577
added: v8.4.0
578578
-->
579579

580580
* `settings` {HTTP/2 Settings Object}
581+
* `callback` {Function} Callback that is called once the session is connected or
582+
right away if the session is already connected.
583+
* `err` {Error|null}
584+
* `settings` {HTTP/2 Settings Object} The updated `settings` object.
585+
* `duration` {integer}
581586

582587
Updates the current local settings for this `Http2Session` and sends a new
583588
`SETTINGS` frame to the connected HTTP/2 peer.
@@ -2232,7 +2237,7 @@ Returns an object containing the default settings for an `Http2Session`
22322237
instance. This method returns a new object instance every time it is called
22332238
so instances returned may be safely modified for use.
22342239

2235-
### http2.getPackedSettings(settings)
2240+
### http2.getPackedSettings([settings])
22362241
<!-- YAML
22372242
added: v8.4.0
22382243
-->

0 commit comments

Comments
 (0)