mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
doc, comments: Grammar and spelling fixes
Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/joyent/node/pull/25591
This commit is contained in:
1 parent
16f547600a
commit
5ccb429ee8
9 files changed
+18
-18
No files matched your search
@@ -43,7 +43,7 @@ Creating a typed array from a `Buffer` works with the following caveats:
|
||||
|
||||
2. The buffer's memory is interpreted as an array, not a byte array. That is,
|
||||
`new Uint32Array(new Buffer([1,2,3,4]))` creates a 4-element `Uint32Array`
|
||||
with elements `[1,2,3,4]`, not an `Uint32Array` with a single element
|
||||
with elements `[1,2,3,4]`, not a `Uint32Array` with a single element
|
||||
`[0x1020304]` or `[0x4030201]`.
|
||||
|
||||
NOTE: Node.js v0.8 simply retained a reference to the buffer in `array.buffer`
|
||||
|
||||
@@ -599,7 +599,7 @@ It is not emitted in the worker.
|
||||
|
||||
### Event: 'disconnect'
|
||||
|
||||
Similar to the `cluster.on('disconnect')` event, but specfic to this worker.
|
||||
Similar to the `cluster.on('disconnect')` event, but specific to this worker.
|
||||
|
||||
cluster.fork().on('disconnect', function() {
|
||||
// Worker has disconnected
|
||||
|
||||
@@ -529,7 +529,7 @@ Example (obtaining a shared secret):
|
||||
|
||||
## crypto.createECDH(curve_name)
|
||||
|
||||
Creates a Elliptic Curve (EC) Diffie-Hellman key exchange object using a
|
||||
Creates an Elliptic Curve (EC) Diffie-Hellman key exchange object using a
|
||||
predefined curve specified by `curve_name` string.
|
||||
|
||||
## Class: ECDH
|
||||
|
||||
@@ -81,7 +81,7 @@ See [supported `getaddrinfo` flags](#dns_supported_getaddrinfo_flags) below for
|
||||
more information on supported flags.
|
||||
|
||||
The callback has arguments `(err, address, family)`. The `address` argument
|
||||
is a string representation of a IP v4 or v6 address. The `family` argument
|
||||
is a string representation of an IP v4 or v6 address. The `family` argument
|
||||
is either the integer 4 or 6 and denotes the family of `address` (not
|
||||
necessarily the value initially passed to `lookup`).
|
||||
|
||||
@@ -155,7 +155,7 @@ attribute (e.g. `[{'priority': 10, 'exchange': 'mx.example.com'},...]`).
|
||||
## dns.resolveTxt(hostname, callback)
|
||||
|
||||
The same as `dns.resolve()`, but only for text queries (`TXT` records).
|
||||
`addresses` is an 2-d array of the text records available for `hostname` (e.g.,
|
||||
`addresses` is a 2-d array of the text records available for `hostname` (e.g.,
|
||||
`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
|
||||
one record. Depending on the use case, the could be either joined together or
|
||||
treated separately.
|
||||
|
||||
@@ -90,7 +90,7 @@ Common options are:
|
||||
a FIN packet when the other end of the socket sends a FIN packet.
|
||||
Defaults to `false`. See ['end'][] event for more information.
|
||||
|
||||
The `connectListener` parameter will be added as an listener for the
|
||||
The `connectListener` parameter will be added as a listener for the
|
||||
['connect'][] event.
|
||||
|
||||
Here is an example of a client of echo server as described previously:
|
||||
@@ -119,7 +119,7 @@ changed to
|
||||
|
||||
Creates a TCP connection to `port` on `host`. If `host` is omitted,
|
||||
`'localhost'` will be assumed.
|
||||
The `connectListener` parameter will be added as an listener for the
|
||||
The `connectListener` parameter will be added as a listener for the
|
||||
['connect'][] event.
|
||||
|
||||
Is a factory method which returns a new ['net.Socket'](#net_class_net_socket).
|
||||
@@ -128,7 +128,7 @@ Is a factory method which returns a new ['net.Socket'](#net_class_net_socket).
|
||||
## net.createConnection(path[, connectListener])
|
||||
|
||||
Creates unix socket connection to `path`.
|
||||
The `connectListener` parameter will be added as an listener for the
|
||||
The `connectListener` parameter will be added as a listener for the
|
||||
['connect'][] event.
|
||||
|
||||
A factory method which returns a new ['net.Socket'](#net_class_net_socket).
|
||||
@@ -150,7 +150,7 @@ parameter is 511 (not 512).
|
||||
|
||||
This function is asynchronous. When the server has been bound,
|
||||
['listening'][] event will be emitted. The last parameter `callback`
|
||||
will be added as an listener for the ['listening'][] event.
|
||||
will be added as a listener for the ['listening'][] event.
|
||||
|
||||
One issue some users run into is getting `EADDRINUSE` errors. This means that
|
||||
another server is already running on the requested port. One way of handling this
|
||||
@@ -178,7 +178,7 @@ Start a local socket server listening for connections on the given `path`.
|
||||
|
||||
This function is asynchronous. When the server has been bound,
|
||||
['listening'][] event will be emitted. The last parameter `callback`
|
||||
will be added as an listener for the ['listening'][] event.
|
||||
will be added as a listener for the ['listening'][] event.
|
||||
|
||||
On UNIX, the local domain is usually known as the UNIX domain. The path is a
|
||||
filesystem path name. It is subject to the same naming conventions and
|
||||
@@ -212,7 +212,7 @@ Listening on a file descriptor is not supported on Windows.
|
||||
|
||||
This function is asynchronous. When the server has been bound,
|
||||
['listening'][] event will be emitted.
|
||||
the last parameter `callback` will be added as an listener for the
|
||||
the last parameter `callback` will be added as a listener for the
|
||||
['listening'][] event.
|
||||
|
||||
### server.listen(options[, callback])
|
||||
@@ -374,7 +374,7 @@ This function is asynchronous. When the ['connect'][] event is emitted the
|
||||
socket is established. If there is a problem connecting, the `'connect'` event
|
||||
will not be emitted, the `'error'` event will be emitted with the exception.
|
||||
|
||||
The `connectListener` parameter will be added as an listener for the
|
||||
The `connectListener` parameter will be added as a listener for the
|
||||
['connect'][] event.
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -371,7 +371,7 @@ function parserOnIncomingClient(res, shouldKeepAlive) {
|
||||
var req = socket._httpMessage;
|
||||
|
||||
|
||||
// propogate "domain" setting...
|
||||
// propagate "domain" setting...
|
||||
if (req.domain && !res.domain) {
|
||||
debug('setting "res.domain"');
|
||||
res.domain = req.domain;
|
||||
@@ -474,7 +474,7 @@ function tickOnSocket(req, socket) {
|
||||
socket.parser = parser;
|
||||
socket._httpMessage = req;
|
||||
|
||||
// Setup "drain" propogation.
|
||||
// Setup "drain" propagation.
|
||||
httpSocketSetup(socket);
|
||||
|
||||
// Propagate headers limit from request object to parser
|
||||
|
||||
+2
-2
@@ -600,7 +600,7 @@ Url.prototype.resolveObject = function(relative) {
|
||||
if (psychotic) {
|
||||
result.hostname = result.host = srcPath.shift();
|
||||
//occationaly the auth can get stuck only in host
|
||||
//this especialy happens in cases like
|
||||
//this especially happens in cases like
|
||||
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
|
||||
var authInHost = result.host && result.host.indexOf('@') > 0 ?
|
||||
result.host.split('@') : false;
|
||||
@@ -682,7 +682,7 @@ Url.prototype.resolveObject = function(relative) {
|
||||
result.hostname = result.host = isAbsolute ? '' :
|
||||
srcPath.length ? srcPath.shift() : '';
|
||||
//occationaly the auth can get stuck only in host
|
||||
//this especialy happens in cases like
|
||||
//this especially happens in cases like
|
||||
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
|
||||
var authInHost = result.host && result.host.indexOf('@') > 0 ?
|
||||
result.host.split('@') : false;
|
||||
|
||||
+1
-1
@@ -2070,7 +2070,7 @@ static void OnFatalError(const char* location, const char* message) {
|
||||
|
||||
NO_RETURN void FatalError(const char* location, const char* message) {
|
||||
OnFatalError(location, message);
|
||||
// to supress compiler warning
|
||||
// to suppress compiler warning
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class ObjectWrap {
|
||||
* attached to detached state it will be freed. Be careful not to access
|
||||
* the object after making this call as it might be gone!
|
||||
* (A "weak reference" means an object that only has a
|
||||
* persistant handle.)
|
||||
* persistent handle.)
|
||||
*
|
||||
* DO NOT CALL THIS FROM DESTRUCTOR
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user