From 5b892c44d675cf7f687683a22180685b9c2e60ca Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Thu, 23 May 2019 11:48:52 +0200 Subject: [PATCH] tls: allow client-side sockets to be half-opened Make `tls.connect()` support an `allowHalfOpen` option which specifies whether or not to allow the connection to be half-opened when the `socket` option is not specified. PR-URL: https://github.com/nodejs/node/pull/27836 Reviewed-By: Anna Henningsen Reviewed-By: Ouyang Yadong Reviewed-By: Sam Roberts --- doc/api/tls.md | 7 ++ lib/_tls_wrap.js | 3 +- ...test-tls-connect-allow-half-open-option.js | 73 +++++++++++++++++++ .../test-tls-socket-allow-half-open-option.js | 38 ++++++++++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-tls-connect-allow-half-open-option.js create mode 100644 test/parallel/test-tls-socket-allow-half-open-option.js diff --git a/doc/api/tls.md b/doc/api/tls.md index f801479041c204..b99ac6e4069f8d 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1177,6 +1177,9 @@ being issued by trusted CA (`options.ca`).