mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
doc: Clarified read method with specified size argument.
Made explicitely clear that when size bytes are not available, it will return null, unless we've ended, in which case the data remaining in the buffer will be returned. Fixes #7273 Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/joyent/node/pull/25591
This commit is contained in:
1 parent
cb660ab3d3
commit
6b6bd21497
1 file changed
+3
-1
@@ -227,7 +227,9 @@ returns it. If there is no data available, then it will return
|
||||
`null`.
|
||||
|
||||
If you pass in a `size` argument, then it will return that many
|
||||
bytes. If `size` bytes are not available, then it will return `null`.
|
||||
bytes. If `size` bytes are not available, then it will return `null`,
|
||||
unless we've ended, in which case it will return the data remaining
|
||||
in the buffer.
|
||||
|
||||
If you do not specify a `size` argument, then it will return all the
|
||||
data in the internal buffer.
|
||||
|
||||
Reference in new issue
Block a user