duplex.allowHalfOpen
- 类型:<boolean>
如果为 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.】