Skip to content

Commit

Permalink
doc: add docs for duplex.allowHalfOpen property
Browse files Browse the repository at this point in the history
PR-URL: #39126
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
pimterry authored and targos committed Sep 6, 2021
1 parent bc2b73e commit 8ea4bef
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/api/stream.md
Expand Up @@ -1652,6 +1652,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
Expand Down

0 comments on commit 8ea4bef

Please sign in to comment.