Skip to content

Commit a94314d

Browse files
committed
doc: document timeout option for tls.connect()
1 parent 6c306b6 commit a94314d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/api/tls.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,11 @@ changes:
17301730
**Default:** `1024`.
17311731
* `highWaterMark` {number} Consistent with the readable stream `highWaterMark` parameter.
17321732
**Default:** `16 * 1024`.
1733+
* `timeout` {number} Sets the socket to timeout after `timeout` milliseconds
1734+
of inactivity. By default, no timeout is set. This option is supported
1735+
because `tls.connect()` internally uses
1736+
[`net.createConnection()`][] and is equivalent to calling
1737+
[`socket.setTimeout()`][] on the returned socket.
17331738
* `secureContext`: TLS context object created with
17341739
[`tls.createSecureContext()`][]. If a `secureContext` is _not_ provided, one
17351740
will be created by passing the entire `options` object to
@@ -1740,7 +1745,7 @@ changes:
17401745
`onread` option of [`net.Socket`][] for details.
17411746
* ...: [`tls.createSecureContext()`][] options that are used if the
17421747
`secureContext` option is missing, otherwise they are ignored.
1743-
* ...: Any [`socket.connect()`][] option not already listed.
1748+
* ...: Any [`net.createConnection()`][] option not already listed.
17441749
* `callback` {Function}
17451750
* Returns: {tls.TLSSocket}
17461751

0 commit comments

Comments
 (0)