https://github.com/floatdrop/infinity-agent
Creates HTTP/HTTPS Agent with Infinity maxSockets
https://github.com/floatdrop/infinity-agent
Last synced: 9 months ago
JSON representation
Creates HTTP/HTTPS Agent with Infinity maxSockets
- Host: GitHub
- URL: https://github.com/floatdrop/infinity-agent
- Owner: floatdrop
- License: mit
- Created: 2015-01-04T17:14:11.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-20T17:12:57.000Z (about 11 years ago)
- Last Synced: 2025-08-09T08:40:32.821Z (9 months ago)
- Language: JavaScript
- Size: 375 KB
- Stars: 11
- Watchers: 1
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# infinity-agent [](https://travis-ci.org/floatdrop/infinity-agent)
Node-core HTTP Agent for userland.
## Usage
```js
var infinityAgent = require('infinity-agent');
var http = require('http');
var https = require('https');
http.get('http://google.com', {agent: infinityAgent.http.globalAgent});
https.get('http://google.com', {agent: infinityAgent.https.globalAgent});
```
This package is a mirror of the Agent class in Node-core.
There is one minor change in [addRequest](https://github.com/floatdrop/infinity-agent/blob/master/http.js#L135-L140) method: basically we disable keepAlive if agent is not configured for it, and `maxSockets` is set to `Infinity`.
## License
MIT © [Vsevolod Strukchinsky](floatdrop@gmail.com)