From 8850ef276ad215b7449cee713bc6096d067c33f7 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Mon, 1 Jul 2019 18:42:14 +0200 Subject: [PATCH] doc: add description for the listener argument Clarify that `listener` is registered as a one-time listener of the `'connect'` event. PR-URL: https://github.com/nodejs/node/pull/28500 Fixes: https://github.com/nodejs/node/issues/28217 Reviewed-By: Roman Reiss Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater Reviewed-By: Yongsheng Zhang --- doc/api/http2.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index c940b6c89255e5..b015b3e84ae249 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -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. @@ -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