Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc: document the connection event for HTTP2 & TLS servers
  • Loading branch information
pimterry committed Jul 27, 2020
commit a65f19e3e534455a512cfa281b4ac1c26a9c4d24
28 changes: 28 additions & 0 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,20 @@ added: v0.3.2

Accepts encrypted connections using TLS or SSL.

### Event: `'connection'`
<!-- YAML
added: v0.3.2
-->

* `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 TLS server. In that case, any [`Duplex`][] stream can be passed.

### Event: `'keylog'`
<!-- YAML
added:
Expand Down