From a32b8787a43a6bb9ec5fbd9e0dfd0932f16e5b69 Mon Sep 17 00:00:00 2001 From: Michael Ridgway Date: Tue, 26 Nov 2013 12:49:28 -0800 Subject: [PATCH] doc: http: document ServerResponse 'finish' event --- doc/api/http.markdown | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 882ea0f..577d7c2 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -235,6 +235,17 @@ The response implements the [Writable Stream][] interface. This is an Indicates that the underlying connection was terminated before [response.end()][] was called or able to flush. +### Event: 'finish' + +`function () { }` + +Emitted when the response has been sent. More specifically, this event is +emitted when the last segment of the response headers and body have been +handed off to the operating system for transmission over the network. It +does not imply that the client has received anything yet. + +After this event, no more events will be emitted on the response object. + ### response.writeContinue() Sends a HTTP/1.1 100 Continue message to the client, indicating that -- 2.7.4