Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorTim Perry <pimterry@gmail.com>2021-06-23 17:20:08 +0300
committerLuigi Pinca <luigipinca@gmail.com>2021-08-30 17:28:57 +0300
commitd14878dc7c6d23038b59e837fcd61f8b35fced30 (patch)
tree514812150995140c54fc41a6be7dae29aa0558dc /doc/api
parentc67dc3ec577af87cb8343b756392bc80fb26040e (diff)
doc: add docs for duplex.allowHalfOpen property
PR-URL: https://github.com/nodejs/node/pull/39126 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/stream.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md
index a7a8bedd924..13b1f2bef76 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -1651,6 +1651,21 @@ Examples of `Duplex` streams include:
* [zlib streams][zlib]
* [crypto streams][crypto]
+##### `duplex.allowHalfOpen`
+<!-- YAML
+added: v0.9.4
+-->
+
+* {boolean}
+
+If `false` then the stream will automatically end the writable side when the
+readable side ends. Set initially by the `allowHalfOpen` constructor option,
+which defaults to `false`.
+
+This can be changed manually to change the half-open behavior of an existing
+`Duplex` stream instance, but must be changed before the `'end'` event is
+emitted.
+
#### Class: `stream.Transform`
<!-- YAML
added: v0.9.4