From bd54abe3f7744d46cd2bc1a919683a1c7649f4ae Mon Sep 17 00:00:00 2001 From: Harshitha KP Date: Tue, 14 Jan 2020 09:46:08 -0500 Subject: [PATCH] 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 PR-URL: https://github.com/nodejs/node/pull/31356 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- doc/api/stream.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index a33bcdc56aa4f0..2ae9a3f889a9bb 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -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