stream.highWaterMark
- 类型:<number>
写入器在 writeSync() 返回 false 之前将缓冲的最大字节数。当缓冲的数据超过此限制时,调用者在写入更多数据之前应等待排空(drain)。
🌐 The maximum number of bytes that the writer will buffer before
writeSync() returns false. When the buffered data exceeds this limit,
the caller should wait for drain before writing more.
该值可以随时动态更改。这对于通过 onstream 回调接收的流尤其有用,其中默认值(65536)可能需要根据应用需求进行调整。有效范围是 0 到 4294967295。
🌐 The value can be changed dynamically at any time. This is particularly
useful for streams received via the onstream callback, where the
default (65536) may need to be adjusted based on application needs.
The valid range is 0 to 4294967295.