| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1d279ac commit 8b8297d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -116,13 +116,19 @@ added: v0.3.4 | |||
| 116 | 116 | Can have the following fields: | |
| 117 | 117 | * `keepAlive` {boolean} Keep sockets around even when there are no | |
| 118 | 118 | outstanding requests, so they can be used for future requests without | |
| 119 | - having to reestablish a TCP connection. **Default:** `false`. | ||
| 119 | + having to reestablish a TCP connection. Not to be confused with the | ||
| 120 | + `keep-alive` value of the `Connection` header. The `Connection: keep-alive` | ||
| 121 | + header is always sent when using an agent except when the `Connection` | ||
| 122 | + header is explicitly specified or when the `keepAlive` and `maxSockets` | ||
| 123 | + options are respectively set to `false` and `Infinity`, in which case | ||
| 124 | + `Connection: close` will be used. **Default:** `false`. | ||
| 120 | 125 | * `keepAliveMsecs` {number} When using the `keepAlive` option, specifies | |
| 121 | 126 | the [initial delay](net.html#net_socket_setkeepalive_enable_initialdelay) | |
| 122 | 127 | for TCP Keep-Alive packets. Ignored when the | |
| 123 | 128 | `keepAlive` option is `false` or `undefined`. **Default:** `1000`. | |
| 124 | 129 | * `maxSockets` {number} Maximum number of sockets to allow per | |
| 125 | - host. **Default:** `Infinity`. | ||
| 130 | + host. Each request will use a new socket until the maximum is reached. | ||
| 131 | + **Default:** `Infinity`. | ||
| 126 | 132 | * `maxFreeSockets` {number} Maximum number of sockets to leave open | |
| 127 | 133 | in a free state. Only relevant if `keepAlive` is set to `true`. | |
| 128 | 134 | **Default:** `256`. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments