duplex.allowHalfOpen


如果为 false,则当可读端结束时,流将自动结束可写端。 最初由 allowHalfOpen 构造函数选项设置,默认为 true

这可以手动更改以更改现有 Duplex 流实例的半开行为,但必须在触发 'end' 事件之前更改。

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 true.

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.