From fe55480a40cc57777b789ef7ce8a69017dad683e Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sat, 24 Apr 2021 20:10:36 +0200 Subject: [PATCH] fixup! doc: do not mention TCP in the allowHalfOpen option description --- doc/api/net.md | 12 +++++++----- doc/api/tls.md | 8 ++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/api/net.md b/doc/api/net.md index c0733f24848d4e..e8c68c53477b27 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -551,9 +551,10 @@ changes: * `options` {Object} Available options are: * `fd` {number} If specified, wrap around an existing socket with the given file descriptor, otherwise a new socket will be created. - * `allowHalfOpen` {boolean} Indicates whether to automatically end the - writable side when the readable side ends. See [`net.createServer()`][] and - the [`'end'`][] event for details. **Default:** `false`. + * `allowHalfOpen` {boolean} If set to `false`, then the socket will + automatically end the writable side when the readable side ends. See + [`net.createServer()`][] and the [`'end'`][] event for details. **Default:** + `false`. * `readable` {boolean} Allow reads on the socket when an `fd` is passed, otherwise ignored. **Default:** `false`. * `writable` {boolean} Allow writes on the socket when an `fd` is passed, @@ -1295,8 +1296,9 @@ added: v0.5.0 --> * `options` {Object} - * `allowHalfOpen` {boolean} Indicates whether to automatically end the - writable side when the readable side ends. **Default:** `false`. + * `allowHalfOpen` {boolean} If set to `false`, then the socket will + automatically end the writable side when the readable side ends. + **Default:** `false`. * `pauseOnConnect` {boolean} Indicates whether the socket should be paused on incoming connections. **Default:** `false`. * `connectionListener` {Function} Automatically set as a listener for the diff --git a/doc/api/tls.md b/doc/api/tls.md index 7def1f49bb9b91..5675fd22e38723 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1472,10 +1472,10 @@ changes: Connection/disconnection/destruction of `socket` is the user's responsibility; calling `tls.connect()` will not cause `net.connect()` to be called. - * `allowHalfOpen` {boolean} If the `socket` option is missing, indicates - whether to automatically end the writable side when the readable side ends, - otherwise the option is ignored. See the `allowHalfOpen` option of - [`net.Socket`][] for details. **Default:** `false`. + * `allowHalfOpen` {boolean} If set to `false`, then the socket will + automatically end the writable side when the readable side ends. If the + `socket` option is set, this option has no effect. See the `allowHalfOpen` + option of [`net.Socket`][] for details. **Default:** `false`. * `rejectUnauthorized` {boolean} If not `false`, the server certificate is verified against the list of supplied CAs. An `'error'` event is emitted if verification fails; `err.code` contains the OpenSSL error code. **Default:**