s/streams/stream/

This commit is contained in:
isaacs 2012-02-27 11:18:10 -08:00
parent 674416fbc9
commit 7bfa5cf284
7 changed files with 13 additions and 11 deletions

View File

@ -9,7 +9,7 @@
* [Utilities](util.html) * [Utilities](util.html)
* [Events](events.html) * [Events](events.html)
* [Buffer](buffer.html) * [Buffer](buffer.html)
* [Streams](streams.html) * [Stream](stream.html)
* [Crypto](crypto.html) * [Crypto](crypto.html)
* [TLS/SSL](tls.html) * [TLS/SSL](tls.html)
* [String Decoder](string_decoder.html) * [String Decoder](string_decoder.html)

View File

@ -9,7 +9,7 @@
@include util @include util
@include events @include events
@include buffer @include buffer
@include streams @include stream
@include crypto @include crypto
@include tls @include tls
@include string_decoder @include string_decoder

View File

@ -515,7 +515,7 @@ An example to read the last 10 bytes of a file which is 100 bytes long:
## Class: fs.ReadStream ## Class: fs.ReadStream
`ReadStream` is a [Readable Stream](streams.html#readable_Stream). `ReadStream` is a [Readable Stream](stream.html#readable_stream).
### Event: 'open' ### Event: 'open'
@ -541,7 +541,7 @@ default mode `w`.
## fs.WriteStream ## fs.WriteStream
`WriteStream` is a [Writable Stream](streams.html#writable_Stream). `WriteStream` is a [Writable Stream](stream.html#writable_stream).
### Event: 'open' ### Event: 'open'

View File

@ -128,7 +128,7 @@ See [net.Server.close()](net.html#server.close).
This object is created internally by a HTTP server -- not by This object is created internally by a HTTP server -- not by
the user -- and passed as the first argument to a `'request'` listener. 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: interface. This is an `EventEmitter` with the following events:
### Event: 'data' ### Event: 'data'
@ -248,7 +248,7 @@ authentication details.
This object is created internally by a HTTP server--not by the user. It is This object is created internally by a HTTP server--not by the user. It is
passed as the second parameter to the `'request'` event. 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: interface. This is an `EventEmitter` with the following events:
### Event: 'close' ### Event: 'close'
@ -583,7 +583,7 @@ event, the entire body will be caught.
Note: Node does not check whether Content-Length and the length of the body Note: Node does not check whether Content-Length and the length of the body
which has been transmitted are equal or not. 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: interface. This is an `EventEmitter` with the following events:
### Event 'response' ### Event 'response'
@ -715,7 +715,7 @@ will be called.
This object is created when making a request with `http.request()`. It is This object is created when making a request with `http.request()`. It is
passed to the `'response'` event of the request object. 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: interface. This is an `EventEmitter` with the following events:

View File

@ -377,7 +377,7 @@ See `connect()`.
Emitted when data is received. The argument `data` will be a `Buffer` or Emitted when data is received. The argument `data` will be a `Buffer` or
`String`. Encoding of data is set by `socket.setEncoding()`. `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.) information.)
Note that the __data will be lost__ if there is no listener when a `Socket` Note that the __data will be lost__ if there is no listener when a `Socket`

View File

@ -1,9 +1,11 @@
# Streams # Stream
A stream is an abstract interface implemented by various objects in Node. 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 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`. 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 ## Readable Stream
<!--type=class--> <!--type=class-->

View File

@ -319,7 +319,7 @@ The number of concurrent connections on the server.
This is a stream on top of the *Encrypted* stream that makes it possible to This is a stream on top of the *Encrypted* stream that makes it possible to
read/write an encrypted data as a cleartext data. 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. It has all the common stream methods and events.
A ClearTextStream is the `clear` member of a SecurePair object. A ClearTextStream is the `clear` member of a SecurePair object.