Skip to content

Commit d6c5436

Browse files
committed
[doc] Document setMaxSockets. Fixes #81
1 parent 13eaec5 commit d6c5436

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: README.md

+7
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,13 @@ server.on('upgrade', function(req, socket, head) {
357357
});
358358
```
359359

360+
### Configuring your Socket limits
361+
362+
By default, `node-http-proxy` will set a 100 socket limit for all `host:port` proxy targets. If you wish to change this you can two it in two ways:
363+
364+
1. By passing the `maxSockets` option to `httpProxy.createServer()`
365+
2. By calling `httpProxy.setMaxSockets(n)`, where `n` is the number of sockets you with to use.
366+
360367
## Using node-http-proxy from the command line
361368
When you install this package with npm, a node-http-proxy binary will become available to you. Using this binary is easy with some simple options:
362369

0 commit comments

Comments
 (0)