diff --git a/doc/api/_toc.markdown b/doc/api/_toc.markdown index 1c1f0712f6..73e6b9bd58 100644 --- a/doc/api/_toc.markdown +++ b/doc/api/_toc.markdown @@ -9,7 +9,7 @@ * [Utilities](util.html) * [Events](events.html) * [Buffer](buffer.html) -* [Streams](streams.html) +* [Stream](stream.html) * [Crypto](crypto.html) * [TLS/SSL](tls.html) * [String Decoder](string_decoder.html) diff --git a/doc/api/all.markdown b/doc/api/all.markdown index 60c4ade3f0..7b7f736956 100644 --- a/doc/api/all.markdown +++ b/doc/api/all.markdown @@ -9,7 +9,7 @@ @include util @include events @include buffer -@include streams +@include stream @include crypto @include tls @include string_decoder diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 37dcc4124c..755271bfef 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -558,7 +558,7 @@ An example to read the last 10 bytes of a file which is 100 bytes long: ## Class: fs.ReadStream -`ReadStream` is a [Readable Stream](streams.html#readable_Stream). +`ReadStream` is a [Readable Stream](stream.html#readable_stream). ### Event: 'open' @@ -584,7 +584,7 @@ default mode `w`. ## fs.WriteStream -`WriteStream` is a [Writable Stream](streams.html#writable_Stream). +`WriteStream` is a [Writable Stream](stream.html#writable_stream). ### Event: 'open' diff --git a/doc/api/http.markdown b/doc/api/http.markdown index c2a6c8989a..70bc267a2b 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -154,7 +154,7 @@ no limit will be applied. This object is created internally by a HTTP server -- not by the user -- and passed as the first argument to a `'request'` listener. -The request implements the [Readable Stream](streams.html#readable_Stream) +The request implements the [Readable Stream](stream.html#readable_stream) interface. This is an `EventEmitter` with the following events: ### Event: 'data' @@ -274,7 +274,7 @@ authentication details. This object is created internally by a HTTP server--not by the user. It is passed as the second parameter to the `'request'` event. -The response implements the [Writable Stream](streams.html#writable_Stream) +The response implements the [Writable Stream](stream.html#writable_stream) interface. This is an `EventEmitter` with the following events: ### Event: 'close' @@ -616,7 +616,7 @@ event, the entire body will be caught. Note: Node 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](streams.html#writable_Stream) +The request implements the [Writable Stream](stream.html#writable_stream) interface. This is an `EventEmitter` with the following events: ### Event 'response' @@ -808,7 +808,7 @@ will be called. This object is created when making a request with `http.request()`. It is passed to the `'response'` event of the request object. -The response implements the [Readable Stream](streams.html#readable_Stream) +The response implements the [Readable Stream](stream.html#readable_stream) interface. This is an `EventEmitter` with the following events: diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 7923706567..6c66364e78 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -392,7 +392,7 @@ See `connect()`. Emitted when data is received. The argument `data` will be a `Buffer` or `String`. Encoding of data is set by `socket.setEncoding()`. -(See the [Readable Stream](streams.html#readable_Stream) section for more +(See the [Readable Stream](stream.html#readable_stream) section for more information.) Note that the __data will be lost__ if there is no listener when a `Socket` diff --git a/doc/api/streams.markdown b/doc/api/stream.markdown similarity index 98% rename from doc/api/streams.markdown rename to doc/api/stream.markdown index b542de066e..0edf22fbd5 100644 --- a/doc/api/streams.markdown +++ b/doc/api/stream.markdown @@ -1,9 +1,11 @@ -# Streams +# Stream A stream is an abstract interface implemented by various objects in Node. For example a request to an HTTP server is a stream, as is stdout. Streams are readable, writable, or both. All streams are instances of `EventEmitter`. +You can load up the Stream base class by doing `require('stream')`. + ## Readable Stream diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index a0fd05fc4b..62a18e2841 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -328,7 +328,7 @@ The number of concurrent connections on the server. This is a stream on top of the *Encrypted* stream that makes it possible to read/write an encrypted data as a cleartext data. -This instance implements a duplex [Stream](streams.html#streams) interfaces. +This instance implements a duplex [Stream](stream.html) interfaces. It has all the common stream methods and events. A ClearTextStream is the `clear` member of a SecurePair object.