diff options
author | Tim Perry <pimterry@gmail.com> | 2020-07-27 21:08:38 +0300 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2020-08-03 12:59:58 +0300 |
commit | e5dacc2f8595164e3f25170e65143082c6ae9fc7 (patch) | |
tree | 4eab87463d55141fcee3554f8ddeb72c3afbea86 /doc/api/http2.md | |
parent | b7a23295e84479843c4975bd6ed876392a9d7602 (diff) |
doc: document the connection event for HTTP2 & TLS servers
PR-URL: https://github.com/nodejs/node/pull/34531
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc/api/http2.md')
-rw-r--r-- | doc/api/http2.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md index 122d9deb517..00aacd4335a 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1727,6 +1727,20 @@ the request body. When this event is emitted and handled, the [`'request'`][] event will not be emitted. +### Event: `'connection'` +<!-- YAML +added: v8.4.0 +--> + +* `socket` {stream.Duplex} + +This event is emitted when a new TCP stream is established. `socket` is +typically an object of type [`net.Socket`][]. Usually users will not want to +access this event. + +This event can also be explicitly emitted by users to inject connections +into the HTTP server. In that case, any [`Duplex`][] stream can be passed. + #### Event: `'request'` <!-- YAML added: v8.4.0 @@ -1888,6 +1902,20 @@ the request body. When this event is emitted and handled, the [`'request'`][] event will not be emitted. +### Event: `'connection'` +<!-- YAML +added: v8.4.0 +--> + +* `socket` {stream.Duplex} + +This event is emitted when a new TCP stream is established, before the TLS +handshake begins. `socket` is typically an object of type [`net.Socket`][]. +Usually users will not want to access this event. + +This event can also be explicitly emitted by users to inject connections +into the HTTP server. In that case, any [`Duplex`][] stream can be passed. + #### Event: `'request'` <!-- YAML added: v8.4.0 |