From c18d9587502701dd2fd0bfe5bbdeba4654edc3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=88=9A?= Date: Fri, 2 Feb 2018 18:40:01 +0800 Subject: [PATCH] doc: modify the return value of request.write() PR-URL: https://github.com/nodejs/node/pull/18526 Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- doc/api/http.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/http.md b/doc/api/http.md index d2c6d3ec98f3e9..58e5b53eaf41d3 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -681,7 +681,9 @@ Defaults to `'utf8'`. The `callback` argument is optional and will be called when this chunk of data is flushed. -Returns `request`. +Returns `true` if the entire data was flushed successfully to the kernel +buffer. Returns `false` if all or part of the data was queued in user memory. +`'drain'` will be emitted when the buffer is free again. ## Class: http.Server