|
3 | 3 | > Stability: 2 - Stable |
4 | 4 |
|
5 | 5 | 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 |
7 | 7 | or local communications (domain sockets on UNIX, named pipes on Windows). |
8 | 8 | It can be accessed using: |
9 | 9 |
|
@@ -155,7 +155,8 @@ on Linux. The default value of this parameter is 511 (not 512). |
155 | 155 |
|
156 | 156 | Note: |
157 | 157 |
|
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). |
159 | 160 | * The `server.listen()` method may be called multiple times. Each |
160 | 161 | subsequent call will *re-open* the server using the provided options. |
161 | 162 |
|
@@ -405,14 +406,16 @@ See also: the return values of `socket.write()` |
405 | 406 | added: v0.1.90 |
406 | 407 | --> |
407 | 408 |
|
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. |
409 | 411 |
|
410 | 412 | By default (`allowHalfOpen` is `false`) the socket will send a FIN packet |
411 | 413 | back and destroy its file descriptor once it has written out its pending |
412 | 414 | 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). |
416 | 419 |
|
417 | 420 | ### Event: 'error' |
418 | 421 | <!-- YAML |
@@ -978,6 +981,7 @@ Returns true if input is a version 6 IP address, otherwise returns false. |
978 | 981 | [`dns.lookup()`]: dns.html#dns_dns_lookup_hostname_options_callback |
979 | 982 | [`dns.lookup()` hints]: dns.html#dns_supported_getaddrinfo_flags |
980 | 983 | [`EventEmitter`]: events.html#events_class_eventemitter |
| 984 | +[`net.createConnection()`]: #net_net_createconnection_options_connectlistener |
981 | 985 | [`net.createServer()`]: #net_net_createserver_options_connectionlistener |
982 | 986 | [`net.Server`]: #net_class_net_server |
983 | 987 | [`net.Socket`]: #net_class_net_socket |
|
0 commit comments