| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 042985c commit ed5ef21
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -551,9 +551,10 @@ changes: | |||
| 551 | 551 | * `options` {Object} Available options are: | |
| 552 | 552 | * `fd` {number} If specified, wrap around an existing socket with | |
| 553 | 553 | 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`. | ||
| 557 | 558 | * `readable` {boolean} Allow reads on the socket when an `fd` is passed, | |
| 558 | 559 | otherwise ignored. **Default:** `false`. | |
| 559 | 560 | * `writable` {boolean} Allow writes on the socket when an `fd` is passed, | |
@@ -612,14 +613,14 @@ See also: the return values of `socket.write()`. | |||
| 612 | 613 | added: v0.1.90 | |
| 613 | 614 | --> | |
| 614 | 615 | ||
| 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. | ||
| 617 | 618 | ||
| 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 | ||
| 623 | 624 | [`end()`][`socket.end()`] explicitly to close the connection (i.e. sending a | |
| 624 | 625 | FIN packet back). | |
| 625 | 626 | ||
@@ -1295,8 +1296,9 @@ added: v0.5.0 | |||
| 1295 | 1296 | --> | |
| 1296 | 1297 | ||
| 1297 | 1298 | * `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`. | ||
| 1300 | 1302 | * `pauseOnConnect` {boolean} Indicates whether the socket should be | |
| 1301 | 1303 | paused on incoming connections. **Default:** `false`. | |
| 1302 | 1304 | * `connectionListener` {Function} Automatically set as a listener for the | |
@@ -1306,10 +1308,12 @@ added: v0.5.0 | |||
| 1306 | 1308 | Creates a new TCP or [IPC][] server. | |
| 1307 | 1309 | ||
| 1308 | 1310 | If `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. | ||
| 1313 | 1317 | ||
| 1314 | 1318 | If `pauseOnConnect` is set to `true`, then the socket associated with each | |
| 1315 | 1319 | incoming connection will be paused, and no data will be read from its handle. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1473,10 +1473,10 @@ changes: | |||
| 1473 | 1473 | Connection/disconnection/destruction of `socket` is the user's | |
| 1474 | 1474 | responsibility; calling `tls.connect()` will not cause `net.connect()` to be | |
| 1475 | 1475 | called. | |
| 1476 | - * `allowHalfOpen` {boolean} If the `socket` option is missing, indicates | ||
| 1477 | - whether or not to allow the internally created socket to be half-open, | ||
| 1478 | - otherwise the option is ignored. See the `allowHalfOpen` option of | ||
| 1479 | - [`net.Socket`][] for details. **Default:** `false`. | ||
| 1476 | + * `allowHalfOpen` {boolean} If set to `false`, then the socket will | ||
| 1477 | + automatically end the writable side when the readable side ends. If the | ||
| 1478 | + `socket` option is set, this option has no effect. See the `allowHalfOpen` | ||
| 1479 | + option of [`net.Socket`][] for details. **Default:** `false`. | ||
| 1480 | 1480 | * `rejectUnauthorized` {boolean} If not `false`, the server certificate is | |
| 1481 | 1481 | verified against the list of supplied CAs. An `'error'` event is emitted if | |
| 1482 | 1482 | verification fails; `err.code` contains the OpenSSL error code. **Default:** | |
| Back | FazBrowse Home | New Git URL |
0 commit comments