Skip to content

Commit c94b954

Browse files
committed
doc: socket passed to tls.connect is user managed
Replace nodejs#8996
1 parent 43b8c9e commit c94b954

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/api/tls.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,11 @@ added: v0.11.3
760760
specified, `host` and `port` are ignored.
761761
* `socket` {net.Socket} Establish secure connection on a given socket rather
762762
than creating a new socket. If this option is specified, `path`, `host` and
763-
`port` are ignored.
763+
`port` are ignored. Usually, a socket is already connected when passed to
764+
`tls.connect()`, but it can be connected later. Note that
765+
connection/disconnection/destruction of `socket` is the user's
766+
responsibility, calling `tls.connect()` will not cause `net.connect()` to be
767+
called.
764768
* `pfx` {string|Buffer} A string or `Buffer` containing the private key,
765769
certificate, and CA certs of the client in PFX or PKCS12 format.
766770
* `key` {string|string[]|Buffer|Buffer[]} A string, `Buffer`, array of

0 commit comments

Comments
 (0)