@@ -551,9 +551,10 @@ changes:
551551* ` options ` {Object} Available options are:
552552 * ` fd ` {number} If specified, wrap around an existing socket with
553553 the given file descriptor, otherwise a new socket will be created.
554- * ` allowHalfOpen ` {boolean} Indicates whether half-opened TCP connections
555- are allowed. See [ ` net.createServer() ` ] [ ] and the [ ` 'end' ` ] [ ] event
556- for details. ** Default:** ` false ` .
554+ * ` allowHalfOpen ` {boolean} If set to ` false ` , then the socket will
555+ automatically end the writable side when the readable side ends. See
556+ [ ` net.createServer() ` ] [ ] and the [ ` 'end' ` ] [ ] event for details. ** Default:**
557+ ` false ` .
557558 * ` readable ` {boolean} Allow reads on the socket when an ` fd ` is passed,
558559 otherwise ignored. ** Default:** ` false ` .
559560 * ` writable ` {boolean} Allow writes on the socket when an ` fd ` is passed,
@@ -612,14 +613,14 @@ See also: the return values of `socket.write()`.
612613added: v0.1.90
613614-->
614615
615- Emitted when the other end of the socket sends a FIN packet , thus ending the
616- readable side of the socket.
616+ Emitted when the other end of the socket signals the end of transmission , thus
617+ ending the readable side of the socket.
617618
618- By default (` allowHalfOpen ` is ` false ` ) the socket will send a FIN packet
619- back and destroy its file descriptor once it has written out its pending
620- write queue. However, if ` allowHalfOpen ` is set to ` true ` , the socket will
621- not automatically [ ` end() ` ] [ `socket.end()` ] its writable side, allowing the
622- user to write arbitrary amounts of data. The user must call
619+ By default (` allowHalfOpen ` is ` false ` ) the socket will send an end of
620+ transmission packet back and destroy its file descriptor once it has written out
621+ its pending write queue. However, if ` allowHalfOpen ` is set to ` true ` , the
622+ socket will not automatically [ ` end() ` ] [ `socket.end()` ] its writable side,
623+ allowing the user to write arbitrary amounts of data. The user must call
623624[ ` end() ` ] [ `socket.end()` ] explicitly to close the connection (i.e. sending a
624625FIN packet back).
625626
@@ -1295,8 +1296,9 @@ added: v0.5.0
12951296-->
12961297
12971298* ` options ` {Object}
1298- * ` allowHalfOpen ` {boolean} Indicates whether half-opened TCP
1299- connections are allowed. ** Default:** ` false ` .
1299+ * ` allowHalfOpen ` {boolean} If set to ` false ` , then the socket will
1300+ automatically end the writable side when the readable side ends.
1301+ ** Default:** ` false ` .
13001302 * ` pauseOnConnect ` {boolean} Indicates whether the socket should be
13011303 paused on incoming connections. ** Default:** ` false ` .
13021304* ` connectionListener ` {Function} Automatically set as a listener for the
@@ -1306,10 +1308,12 @@ added: v0.5.0
13061308Creates a new TCP or [ IPC] [ ] server.
13071309
13081310If ` allowHalfOpen ` is set to ` true ` , when the other end of the socket
1309- sends a FIN packet, the server will only send a FIN packet back when
1310- [ ` socket.end() ` ] [ ] is explicitly called, until then the connection is
1311- half-closed (non-readable but still writable). See [ ` 'end' ` ] [ ] event
1312- and [ RFC 1122] [ half-closed ] (section 4.2.2.13) for more information.
1311+ signals the end of transmission, the server will only send back the end of
1312+ transmission when [ ` socket.end() ` ] [ ] is explicitly called. For example, in the
1313+ context of TCP, when a FIN packed is received, a FIN packed is sent
1314+ back only when [ ` socket.end() ` ] [ ] is explicitly called. Until then the
1315+ connection is half-closed (non-readable but still writable). See [ ` 'end' ` ] [ ]
1316+ event and [ RFC 1122] [ half-closed ] (section 4.2.2.13) for more information.
13131317
13141318If ` pauseOnConnect ` is set to ` true ` , then the socket associated with each
13151319incoming connection will be paused, and no data will be read from its handle.
0 commit comments