agentkeepalive
Advanced tools
Comparing version 2.0.0 to 2.0.1
2.0.1 / 2015-04-19 | ||
================== | ||
* fix: add timeoutSocketCount to getCurrentStatus() | ||
* feat(getCurrentStatus): add getCurrentStatus | ||
2.0.0 / 2015-04-01 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -86,2 +86,22 @@ /**! | ||
Agent.prototype.getCurrentStatus = function () { | ||
return { | ||
createSocketCount: this.createSocketCount, | ||
closeSocketCount: this.closeSocketCount, | ||
timeoutSocketCount: this.timeoutSocketCount, | ||
requestCount: this.requestCount, | ||
freeSockets: inspect(this.freeSockets), | ||
sockets: inspect(this.sockets), | ||
requests: inspect(this.requests) | ||
}; | ||
}; | ||
function inspect(obj) { | ||
var res = {}; | ||
for (var key in obj) { | ||
res[key] = obj[key].length; | ||
} | ||
return res; | ||
} | ||
function HttpsAgent(options) { | ||
@@ -88,0 +108,0 @@ Agent.call(this, options); |
{ | ||
"name": "agentkeepalive", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Missing keepalive http.Agent", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -98,2 +98,18 @@ # agentkeepalive | ||
### `agent.getCurrentStatus()` | ||
`agent.getCurrentStatus()` will return a object to show the status of this agent: | ||
```js | ||
{ | ||
createSocketCount: 10, | ||
closeSocketCount: 5, | ||
timeoutSocketCount: 0, | ||
requestCount: 5, | ||
freeSockets: { 'localhost:57479::': 3 }, | ||
sockets: { 'localhost:57479::': 5 }, | ||
requests: {} | ||
} | ||
``` | ||
### Support `https` | ||
@@ -100,0 +116,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23825
401
234