doc: clarify undocumented stream properties

Fixes: https://github.com/nodejs/node/issues/28592
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36715
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
James M Snell authored and Danielle Adams committed 2021-01-12 07:10:30 -05:00
1 parent 242ce19346
commit 214dbac8ff
1 file changed
+6 -2
+6 -2
View File
@@ -75,8 +75,7 @@ object mode is not safe.
<!--type=misc-->
Both [`Writable`][] and [`Readable`][] streams will store data in an internal
buffer that can be retrieved using `writable.writableBuffer` or
`readable.readableBuffer`, respectively.
buffer.
The amount of data potentially buffered depends on the `highWaterMark` option
passed into the stream's constructor. For normal streams, the `highWaterMark`
@@ -120,6 +119,11 @@ writing data *to* the socket. Because data may be written to the socket at a
faster or slower rate than data is received, each side should
operate (and buffer) independently of the other.
The mechanics of the internal buffering are an internal implementation detail
and may be changed at any time. However, for certain advanced implementations,
the internal buffers can be retrieved using `writable.writableBuffer` or
`readable.readableBuffer`. Use of these undocumented properties is discouraged.
## API for stream consumers
<!--type=misc-->