Skip to content
Permalink
Browse files
doc: clarify tls.Server 'connection' event documentation
PR-URL: #41917
Fixes: #41880
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
prettydiff authored and danielleadams committed Apr 24, 2022
1 parent f32c397 commit ce15007fd7b4c993ab6ed7122180ed9d0a9c779c
Showing with 3 additions and 2 deletions.
  1. +3 −2 doc/api/tls.md
@@ -480,8 +480,9 @@ 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.
handshake begins. `socket` is typically an object of type [`net.Socket`][] but
will not receive events unlike the socket created from the [`net.Server`][]
`'connection'` event. 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.

0 comments on commit ce15007

Please sign in to comment.