Skip to content

Commit 8ea4bef

Browse files
pimterrytargos
authored andcommitted
doc: add docs for duplex.allowHalfOpen property
PR-URL: #39126 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent bc2b73e commit 8ea4bef

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/api/stream.md

+15
Original file line numberDiff line numberDiff line change
@@ -1652,6 +1652,21 @@ Examples of `Duplex` streams include:
16521652
* [zlib streams][zlib]
16531653
* [crypto streams][crypto]
16541654

1655+
##### `duplex.allowHalfOpen`
1656+
<!-- YAML
1657+
added: v0.9.4
1658+
-->
1659+
1660+
* {boolean}
1661+
1662+
If `false` then the stream will automatically end the writable side when the
1663+
readable side ends. Set initially by the `allowHalfOpen` constructor option,
1664+
which defaults to `false`.
1665+
1666+
This can be changed manually to change the half-open behavior of an existing
1667+
`Duplex` stream instance, but must be changed before the `'end'` event is
1668+
emitted.
1669+
16551670
#### Class: `stream.Transform`
16561671
<!-- YAML
16571672
added: v0.9.4

0 commit comments

Comments
 (0)