Skip to content

Commit

Permalink
doc: add description for the listener argument
Browse files Browse the repository at this point in the history
Clarify that `listener` is registered as a one-time listener of the
`'connect'` event.

Fixes: #28217
  • Loading branch information
lpinca committed Jul 4, 2019
1 parent 26b048e commit 796355e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,8 @@ 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.
* `listener` {Function}
* `listener` {Function} Will be registered as a one-time listener of the
[`'connect'`][] event.
* Returns: {ClientHttp2Session}

Returns a `ClientHttp2Session` instance.
Expand Down Expand Up @@ -3467,6 +3468,7 @@ following additional properties:
[Stream]: stream.html#stream_stream
[Using `options.selectPadding()`]: #http2_using_options_selectpadding
[`'checkContinue'`]: #http2_event_checkcontinue
[`'connect'`]: #http2_event_connect
[`'request'`]: #http2_event_request
[`'unknownProtocol'`]: #http2_event_unknownprotocol
[`ClientHttp2Stream`]: #http2_class_clienthttp2stream
Expand Down

0 comments on commit 796355e

Please sign in to comment.