Skip to content

Commit

Permalink
doc: explain _writev() API
Browse files Browse the repository at this point in the history
the exact context of invocation of _writev API is not well known
also, the choice between _write and _writev is not well known.
add a description to make it explicit.

Fixes: #28408
Refs: #28690

Co-authored-by: Parker Bjur <bjur.parker45@gmail.com>
  • Loading branch information
HarshithaKP and parkerbjur committed Jan 16, 2020
1 parent 9530362 commit e2f3c96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1886,8 +1886,8 @@ methods only.

The `writable._writev()` method may be implemented in addition or alternatively
to `writable._write()` in stream implementations that are capable of processing
multiple chunks of data at once. If implemented, the method will be called with
all chunks of data currently buffered in the write queue.
multiple chunks of data at once. If implemented and if there are buffered data
from previous writes, `_writev` will be called instead of `_write`.

The `writable._writev()` method is prefixed with an underscore because it is
internal to the class that defines it, and should never be called directly by
Expand Down

0 comments on commit e2f3c96

Please sign in to comment.