summaryrefslogtreecommitdiff
path: root/doc/api/net.md
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-04-29 14:16:44 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-05-02 06:17:08 +0300
commit392d80a617fab8630e3f017076f1f59403db6470 (patch)
tree8569c662136f6b70e58612b0130ae7dbfb12e110 /doc/api/net.md
parent536b1fbd3ff38df3d5e8eb0b011820fd94f68b9d (diff)
downloadandroid-node-v8-392d80a617fab8630e3f017076f1f59403db6470.tar.gz
android-node-v8-392d80a617fab8630e3f017076f1f59403db6470.tar.bz2
android-node-v8-392d80a617fab8630e3f017076f1f59403db6470.zip
doc: add missing periods or colons
Some other formatting nits were fixed and some superfluous descriptions were simplified in passing. PR-URL: https://github.com/nodejs/node/pull/20401 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.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.md22
1 files changed, 10 insertions, 12 deletions
diff --git a/doc/api/net.md b/doc/api/net.md
index 041e8e88b4..5b9d837c05 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -114,11 +114,10 @@ added: v0.1.90
* Returns: {Object}
-Returns the bound address, the address family name, and port of the server
-as reported by the operating system if listening on an IP socket.
-Useful to find which port was assigned when getting an OS-assigned address.
-Returns an object with `port`, `family`, and `address` properties:
-`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
+Returns the bound `address`, the address `family` name, and `port` of the server
+as reported by the operating system if listening on an IP socket
+(useful to find which port was assigned when getting an OS-assigned address):
+`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
For a server listening on a pipe or UNIX domain socket, the name is returned
as a string.
@@ -442,7 +441,7 @@ added: v0.1.90
Emitted when the write buffer becomes empty. Can be used to throttle uploads.
-See also: the return values of `socket.write()`
+See also: the return values of `socket.write()`.
### Event: 'end'
<!-- YAML
@@ -504,7 +503,7 @@ added: v0.1.90
Emitted if the socket times out from inactivity. This is only to notify that
the socket has been idle. The user must manually close the connection.
-See also: [`socket.setTimeout()`][]
+See also: [`socket.setTimeout()`][].
### socket.address()
<!-- YAML
@@ -513,9 +512,8 @@ added: v0.1.90
* Returns: {Object}
-Returns the bound address, the address family name and port of the
-socket as reported by the operating system. Returns an object with
-three properties, e.g.
+Returns the bound `address`, the address `family` name and `port` of the
+socket as reported by the operating system:
`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
### socket.bufferSize
@@ -954,7 +952,7 @@ client.on('end', () => {
```
To connect on the socket `/tmp/echo.sock` the second line would just be
-changed to
+changed to:
```js
const client = net.createConnection({ path: '/tmp/echo.sock' });
@@ -1064,7 +1062,7 @@ $ telnet localhost 8124
```
To listen on the socket `/tmp/echo.sock` the third line from the last would
-just be changed to
+just be changed to:
```js
server.listen('/tmp/echo.sock', () => {