From ea4c03a4f06ef318b9494dda08ba1ba551029962 Mon Sep 17 00:00:00 2001 From: MaleDong Date: Tue, 14 Aug 2018 08:57:24 +0800 Subject: [PATCH] doc: clarify ServerResponse explanations In short: `ServerResponse` acutally inherits from `OutgoingMessage`, with a series of methods like those in `Stream.Writable`. So we cannot use `implements`(this has made poeple feel puzzled because there are still many methods we don't need or have), so `inherits from Stream` is enough, due to some core reasons and performance told by mcollina from the ref (See some latest discussions at Ref). Ref: https://github.com/nodejs/node/issues/14146. PR-URL: https://github.com/nodejs/node/pull/22305 Reviewed-By: Matteo Collina Reviewed-By: Trivikram Kamat Reviewed-By: Vse Mozhet Byt Reviewed-By: Jon Moss Reviewed-By: Luigi Pinca --- doc/api/http.md | 10 ++++------ doc/api/http2.md | 6 ++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 8b1274f06d296e..b705638d994689 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -313,8 +313,8 @@ the data is read it will consume memory that can eventually lead to a Node.js does not check whether Content-Length and the length of the body which has been transmitted are equal or not. -The request implements the [Writable Stream][] interface. This is an -[`EventEmitter`][] with the following events: +The request inherits from [Stream][], and additionally implements the +following: ### Event: 'abort'