diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-04-29 20:46:41 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-05-03 02:12:07 +0300 |
commit | 7588ceaf353af0f257d4d832bace4600edac704e (patch) | |
tree | cd01b69085d5c1134c43e61d8acc84586d1a188d /doc/api/net.md | |
parent | bdf5be98dd901f6c312938198439dbda0b20d517 (diff) | |
download | android-node-v8-7588ceaf353af0f257d4d832bace4600edac704e.tar.gz android-node-v8-7588ceaf353af0f257d4d832bace4600edac704e.tar.bz2 android-node-v8-7588ceaf353af0f257d4d832bace4600edac704e.zip |
doc: add more missing backticks
Also, fix some other nits in passing
(formatting, punctuation, typos, redundancy, obsoleteness).
PR-URL: https://github.com/nodejs/node/pull/20438
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc/api/net.md')
-rw-r--r-- | doc/api/net.md | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/doc/api/net.md b/doc/api/net.md index 5b9d837c05..21d14fc706 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -151,7 +151,7 @@ Stops the server from accepting new connections and keeps existing connections. This function is asynchronous, the server is finally closed when all connections are ended and the server emits a [`'close'`][] event. The optional `callback` will be called once the `'close'` event occurs. Unlike -that event, it will be called with an Error as its only argument if the server +that event, it will be called with an `Error` as its only argument if the server was not open when it was closed. ### server.connections @@ -183,7 +183,7 @@ Callback should take two arguments `err` and `count`. ### server.listen() Start a server listening for connections. A `net.Server` can be a TCP or -a [IPC][] server depending on what it listens to. +an [IPC][] server depending on what it listens to. Possible signatures: @@ -295,7 +295,7 @@ added: v0.1.90 * `callback` {Function} Common parameter of [`server.listen()`][] functions. * Returns: {net.Server} -Start a [IPC][] server listening for connections on the given `path`. +Start an [IPC][] server listening for connections on the given `path`. #### server.listen([port[, host[, backlog]]][, callback]) <!-- YAML @@ -326,8 +326,7 @@ may cause the `net.Server` to also listen on the [unspecified IPv4 address][] added: v5.7.0 --> -A Boolean indicating whether or not the server is listening for -connections. +* {boolean} Indicates whether or not the server is listening for connections. ### server.maxConnections <!-- YAML @@ -370,7 +369,7 @@ added: v0.3.4 This class is an abstraction of a TCP socket or a streaming [IPC][] endpoint (uses named pipes on Windows, and UNIX domain sockets otherwise). A `net.Socket` is also a [duplex stream][], so it can be both readable and -writable, and it is also a [`EventEmitter`][]. +writable, and it is also an [`EventEmitter`][]. A `net.Socket` can be created by the user and used directly to interact with a server. For example, it is returned by [`net.createConnection()`][], @@ -558,10 +557,10 @@ Initiate a connection on a given socket. Possible signatures: -* [socket.connect(options[, connectListener])][`socket.connect(options)`] -* [socket.connect(path[, connectListener])][`socket.connect(path)`] +* [`socket.connect(options[, connectListener])`][`socket.connect(options)`] +* [`socket.connect(path[, connectListener])`][`socket.connect(path)`] for [IPC][] connections. -* [socket.connect(port[, host][, connectListener])][`socket.connect(port, host)`] +* [`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`] for TCP connections. * Returns: {net.Socket} The socket itself. @@ -670,8 +669,8 @@ listeners for that event will receive `exception` as an argument. ### socket.destroyed -A Boolean value that indicates if the connection is destroyed or not. Once a -connection is destroyed no further data can be transferred using it. +* {boolean} Indicates if the connection is destroyed or not. Once a + connection is destroyed no further data can be transferred using it. ### socket.end([data][, encoding]) <!-- YAML @@ -775,8 +774,8 @@ Enable/disable keep-alive functionality, and optionally set the initial delay before the first keepalive probe is sent on an idle socket. Set `initialDelay` (in milliseconds) to set the delay between the last -data packet received and the first keepalive probe. Setting 0 for -initialDelay will leave the value unchanged from the default +data packet received and the first keepalive probe. Setting `0` for +`initialDelay` will leave the value unchanged from the default (or previous) setting. ### socket.setNoDelay([noDelay]) @@ -849,7 +848,7 @@ buffer. Returns `false` if all or part of the data was queued in user memory. The optional `callback` parameter will be executed when the data is finally written out - this may not be immediately. -See Writable stream [`write()`][stream_writable_write] method for more +See `Writable` stream [`write()`][stream_writable_write] method for more information. ## net.connect() @@ -1030,7 +1029,7 @@ This allows connections to be passed between processes without any data being read by the original process. To begin reading data from a paused socket, call [`socket.resume()`][]. -The server can be a TCP server or a [IPC][] server, depending on what it +The server can be a TCP server or an [IPC][] server, depending on what it [`listen()`][`server.listen()`] to. Here is an example of an TCP echo server which listens for connections |