Skip to content

Commit fb61a63

Browse files
committed
address comments
1 parent b78b5f3 commit fb61a63

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

doc/api/net.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> Stability: 2 - Stable
44
55
The `net` module provides an asynchronous network API for creating stream-based
6-
servers ([`net.Server`][]) and clients ([`net.Socket`][]) that implement TCP
6+
servers ([`net.createServer()`][]) and clients ([`net.createConnection()`][]) that implement TCP
77
or local communications (domain sockets on UNIX, named pipes on Windows).
88
It can be accessed using:
99

@@ -155,7 +155,8 @@ on Linux. The default value of this parameter is 511 (not 512).
155155

156156
Note:
157157

158-
* All [`net.Socket`][] are set to `SO_REUSEADDR`(See [socket(7)][] for details).
158+
* All [`net.Socket`][] are set to `SO_REUSEADDR` (See [socket(7)][] for
159+
details).
159160
* The `server.listen()` method may be called multiple times. Each
160161
subsequent call will *re-open* the server using the provided options.
161162

@@ -405,14 +406,16 @@ See also: the return values of `socket.write()`
405406
added: v0.1.90
406407
-->
407408

408-
Emitted when the other end of the socket sends a FIN packet.
409+
Emitted when the other end of the socket sends a FIN packet, thus ending the
410+
readable side of the socket.
409411

410412
By default (`allowHalfOpen` is `false`) the socket will send a FIN packet
411413
back and destroy its file descriptor once it has written out its pending
412414
write queue. However, if `allowHalfOpen` is set to `true`, the socket will
413-
not automatically [`end()`][`socket.end()`] its side, allowing the user to
414-
write arbitrary amounts of data. The user must call [`end()`][`socket.end()`]
415-
explicitly to close the connection.
415+
not automatically [`end()`][`socket.end()`] its writable side, allowing the
416+
user to write arbitrary amounts of data. The user must call
417+
[`end()`][`socket.end()`] explicitly to close the connection (i.e. sending a
418+
FIN packet back).
416419

417420
### Event: 'error'
418421
<!-- YAML
@@ -978,6 +981,7 @@ Returns true if input is a version 6 IP address, otherwise returns false.
978981
[`dns.lookup()`]: dns.html#dns_dns_lookup_hostname_options_callback
979982
[`dns.lookup()` hints]: dns.html#dns_supported_getaddrinfo_flags
980983
[`EventEmitter`]: events.html#events_class_eventemitter
984+
[`net.createConnection()`]: #net_net_createconnection_options_connectlistener
981985
[`net.createServer()`]: #net_net_createserver_options_connectionlistener
982986
[`net.Server`]: #net_class_net_server
983987
[`net.Socket`]: #net_class_net_socket

0 commit comments

Comments
 (0)