duplex.allowHalfOpen


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

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

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

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