Consistency changes in api docs
This commit is contained in:
parent
49e0f14a2f
commit
352b8c3ad5
@ -294,7 +294,7 @@ are readable, writable, or both. All streams are instances of `EventEmitter`.
|
|||||||
|
|
||||||
## Readable Stream
|
## Readable Stream
|
||||||
|
|
||||||
A **readable stream** has the following methods, members, and events.
|
A `Readable Stream` has the following methods, members, and events.
|
||||||
|
|
||||||
### Event: 'data'
|
### Event: 'data'
|
||||||
|
|
||||||
@ -357,7 +357,7 @@ Closes the underlying file descriptor. Stream will not emit any more events.
|
|||||||
|
|
||||||
## Writable Stream
|
## Writable Stream
|
||||||
|
|
||||||
A **writable stream** has the following methods, members, and events.
|
A `Writable Stream` has the following methods, members, and events.
|
||||||
|
|
||||||
### Event: 'drain'
|
### Event: 'drain'
|
||||||
|
|
||||||
@ -546,7 +546,7 @@ programs.
|
|||||||
|
|
||||||
### process.stdout
|
### process.stdout
|
||||||
|
|
||||||
A writable stream to `stdout`.
|
A `Writable Stream` to `stdout`.
|
||||||
|
|
||||||
Example: the definition of `console.log`
|
Example: the definition of `console.log`
|
||||||
|
|
||||||
@ -919,7 +919,7 @@ See `waitpid(2)`.
|
|||||||
|
|
||||||
### child.stdin
|
### child.stdin
|
||||||
|
|
||||||
A `writable stream` that represents the child process's `stdin`.
|
A `Writable Stream` that represents the child process's `stdin`.
|
||||||
Closing this stream via `end()` often causes the child process to terminate.
|
Closing this stream via `end()` often causes the child process to terminate.
|
||||||
|
|
||||||
### child.stdout
|
### child.stdout
|
||||||
@ -1568,7 +1568,7 @@ Objects returned from `fs.stat()` and `fs.lstat()` are of this type.
|
|||||||
|
|
||||||
## fs.ReadStream
|
## fs.ReadStream
|
||||||
|
|
||||||
`ReadStream` is a readable stream.
|
`ReadStream` is a `Readable Stream`.
|
||||||
|
|
||||||
### fs.createReadStream(path, [options])
|
### fs.createReadStream(path, [options])
|
||||||
|
|
||||||
@ -1585,7 +1585,7 @@ Returns a new ReadStream object (See `Readable Stream`).
|
|||||||
|
|
||||||
## fs.WriteStream
|
## fs.WriteStream
|
||||||
|
|
||||||
`WriteStream` is a writable stream.
|
`WriteStream` is a `Writable Stream`.
|
||||||
|
|
||||||
### fs.createWriteStream(path, [options])
|
### fs.createWriteStream(path, [options])
|
||||||
|
|
||||||
@ -1821,15 +1821,17 @@ Resumes a paused request.
|
|||||||
|
|
||||||
The `net.Stream` object associated with the connection.
|
The `net.Stream` object associated with the connection.
|
||||||
|
|
||||||
|
|
||||||
With HTTPS support, use request.connection.verifyPeer() and
|
With HTTPS support, use request.connection.verifyPeer() and
|
||||||
request.connection.getPeerCertificate() to obtain the client's
|
request.connection.getPeerCertificate() to obtain the client's
|
||||||
authentication details.
|
authentication details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## http.ServerResponse
|
## http.ServerResponse
|
||||||
|
|
||||||
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. It is a writable stream.
|
passed as the second parameter to the `'request'` event. It is a `Writable Stream`.
|
||||||
|
|
||||||
|
|
||||||
### response.writeHead(statusCode, [reasonPhrase], [headers])
|
### response.writeHead(statusCode, [reasonPhrase], [headers])
|
||||||
@ -2033,7 +2035,7 @@ followed by `request.end()`.
|
|||||||
This object is created when making a request with `http.Client`. It is
|
This object is created when making a request with `http.Client`. 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** interface.
|
The response implements the `Readable Stream` interface.
|
||||||
|
|
||||||
### Event: 'data'
|
### Event: 'data'
|
||||||
|
|
||||||
@ -2198,7 +2200,7 @@ Emitted when a stream connection successfully establishes a HTTPS handshake with
|
|||||||
|
|
||||||
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 `stream.setEncoding()`.
|
`String`. Encoding of data is set by `stream.setEncoding()`.
|
||||||
(See the section on Readable Streams for more information.)
|
(See the section on `Readable Stream` for more information.)
|
||||||
|
|
||||||
### Event: 'end'
|
### Event: 'end'
|
||||||
|
|
||||||
@ -2583,14 +2585,14 @@ are created. Unix domain sockets do not start listening until calling `bind()`
|
|||||||
Emitted when a socket is closed with `close()`. No new `message` events will be emitted
|
Emitted when a socket is closed with `close()`. No new `message` events will be emitted
|
||||||
on this socket.
|
on this socket.
|
||||||
|
|
||||||
### dgram.createSocket(type [, callback])
|
### dgram.createSocket(type, [callback])
|
||||||
|
|
||||||
Creates a datagram socket of the specified types. Valid types are:
|
Creates a datagram socket of the specified types. Valid types are:
|
||||||
`udp4`, `udp6`, and `unix_dgram`.
|
`udp4`, `udp6`, and `unix_dgram`.
|
||||||
|
|
||||||
Takes an optional callback which is added as a listener for `message` events.
|
Takes an optional callback which is added as a listener for `message` events.
|
||||||
|
|
||||||
### dgram.send(buf, offset, length, path [, callback])
|
### dgram.send(buf, offset, length, path, [callback])
|
||||||
|
|
||||||
For Unix domain datagram sockets, the destination address is a pathname in the filesystem.
|
For Unix domain datagram sockets, the destination address is a pathname in the filesystem.
|
||||||
An optional callback may be supplied that is invoked after the `sendto` call is completed
|
An optional callback may be supplied that is invoked after the `sendto` call is completed
|
||||||
@ -2614,7 +2616,7 @@ Example of sending a message to syslogd on OSX via Unix domain socket `/var/run/
|
|||||||
console.log("Wrote " + bytes + " bytes to socket.");
|
console.log("Wrote " + bytes + " bytes to socket.");
|
||||||
});
|
});
|
||||||
|
|
||||||
### dgram.send(buf, offset, length, port, address [, callback])
|
### dgram.send(buf, offset, length, port, address, [callback])
|
||||||
|
|
||||||
For UDP sockets, the destination port and IP address must be specified. A string
|
For UDP sockets, the destination port and IP address must be specified. A string
|
||||||
may be supplied for the `address` parameter, and it will be resolved with DNS. An
|
may be supplied for the `address` parameter, and it will be resolved with DNS. An
|
||||||
@ -2675,7 +2677,7 @@ Example of a Unix domain datagram client that talks to this server:
|
|||||||
});
|
});
|
||||||
client.bind(client_path);
|
client.bind(client_path);
|
||||||
|
|
||||||
### dgram.bind(port [, address])
|
### dgram.bind(port, [address])
|
||||||
|
|
||||||
For UDP sockets, listen for datagrams on a named `port` and optional `address`. If
|
For UDP sockets, listen for datagrams on a named `port` and optional `address`. If
|
||||||
`address` is not specified, the OS will try to listen on all addresses.
|
`address` is not specified, the OS will try to listen on all addresses.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user