Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v6.x backport) doc: fix stylistic issues in api/net.md #11969

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Returns an object with `port`, `family`, and `address` properties:
Example:

```js
var server = net.createServer((socket) => {
const server = net.createServer((socket) => {
socket.end('goodbye\n');
}).on('error', (err) => {
// handle errors here
Expand Down Expand Up @@ -211,7 +211,7 @@ double-backslashes, such as:

```js
net.createServer().listen(
path.join('\\\\?\\pipe', process.cwd(), 'myctl'))
path.join('\\\\?\\pipe', process.cwd(), 'myctl'));
```

The parameter `backlog` behaves the same as in
Expand Down Expand Up @@ -874,8 +874,8 @@ server.listen(8124, () => {

Test this by using `telnet`:

```sh
telnet localhost 8124
```console
$ telnet localhost 8124
```

To listen on the socket `/tmp/echo.sock` the third line from the last would
Expand All @@ -889,8 +889,8 @@ server.listen('/tmp/echo.sock', () => {

Use `nc` to connect to a UNIX domain socket server:

```js
nc -U /tmp/echo.sock
```console
$ nc -U /tmp/echo.sock
```

## net.isIP(input)
Expand Down