Skip to content

Commit 214dbac

Browse files
jasnelldanielleadams
authored andcommitted
doc: clarify undocumented stream properties
Fixes: #28592 Signed-off-by: James M Snell <[email protected]> PR-URL: #36715 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 242ce19 commit 214dbac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

doc/api/stream.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ object mode is not safe.
7575
<!--type=misc-->
7676

7777
Both [`Writable`][] and [`Readable`][] streams will store data in an internal
78-
buffer that can be retrieved using `writable.writableBuffer` or
79-
`readable.readableBuffer`, respectively.
78+
buffer.
8079

8180
The amount of data potentially buffered depends on the `highWaterMark` option
8281
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
120119
faster or slower rate than data is received, each side should
121120
operate (and buffer) independently of the other.
122121

122+
The mechanics of the internal buffering are an internal implementation detail
123+
and may be changed at any time. However, for certain advanced implementations,
124+
the internal buffers can be retrieved using `writable.writableBuffer` or
125+
`readable.readableBuffer`. Use of these undocumented properties is discouraged.
126+
123127
## API for stream consumers
124128

125129
<!--type=misc-->

0 commit comments

Comments
 (0)