Skip to content

Commit

Permalink
doc: revise socket.connect() note
Browse files Browse the repository at this point in the history
Edit note in about `onread` option to `socket.connect()` for clarity.

PR-URL: #30691
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
Trott authored and MylesBorins committed Dec 17, 2019
1 parent f9f3ab2 commit 6fc562c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,9 @@ For both types, available `options` include:

* `onread` {Object} If specified, incoming data is stored in a single `buffer`
and passed to the supplied `callback` when data arrives on the socket.
Note: this will cause the streaming functionality to not provide any data,
however events like `'error'`, `'end'`, and `'close'` will still be emitted
as normal and methods like `pause()` and `resume()` will also behave as
This will cause the streaming functionality to not provide any data.
The socket will emit events like `'error'`, `'end'`, and `'close'`
as usual. Methods like `pause()` and `resume()` will also behave as
expected.
* `buffer` {Buffer|Uint8Array|Function} Either a reusable chunk of memory to
use for storing incoming data or a function that returns such.
Expand Down

0 comments on commit 6fc562c

Please sign in to comment.