diff options
author | Tim Perry <pimterry@gmail.com> | 2021-06-23 16:20:08 +0200 |
---|---|---|
committer | Luigi Pinca <luigipinca@gmail.com> | 2021-08-30 16:28:57 +0200 |
commit | d14878dc7c6d23038b59e837fcd61f8b35fced30 (patch) | |
tree | 514812150995140c54fc41a6be7dae29aa0558dc | |
parent | c67dc3ec577af87cb8343b756392bc80fb26040e (diff) | |
download | node-new-d14878dc7c6d23038b59e837fcd61f8b35fced30.tar.gz |
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>
-rw-r--r-- | doc/api/stream.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index a7a8bedd92..13b1f2bef7 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 |