doc: explain _writev() API

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: https://github.com/nodejs/node/issues/28408
Refs: https://github.com/nodejs/node/pull/28690

Co-authored-by: Parker Bjur <bjur.parker45@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/31356
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Harshitha KPandParker Bjur authored and Shelley Vohr committed 2020-02-17 10:18:33 -08:00
1 parent 91f5e9b0f7
commit bd54abe3f7
1 file changed
+2 -2
+2 -2
View File
@@ -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 is 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