From ce30683012186f8573da7691c528ad6ab7e15407 Mon Sep 17 00:00:00 2001 From: Andreas Madsen Date: Sat, 22 Dec 2012 18:27:08 +0100 Subject: [PATCH] doc: document the finish event Since the stream implementer is not expected to overwrite .end() the finish event is necessary in order to know when no more data can be written --- doc/api/stream.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index b245f04b60..8e3228ca88 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -353,6 +353,11 @@ without buffering again. Listen for it when `stream.write()` returns Emitted when the underlying resource (for example, the backing file descriptor) has been closed. Not all streams will emit this. +### Event: 'finish' + +When `end()` is called and there are no more chunks to write, this +event is emitted. + ### Event: 'pipe' * `source` {Readable Stream}