Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

agentkeepalive

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agentkeepalive - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

benchmark/echo.js

5

History.md
0.2.2 / 2013-11-19
==================
* support node 0.8 and node 0.10
0.2.1 / 2013-11-08

@@ -3,0 +8,0 @@ ==================

2

lib/_http_agent.js

@@ -323,2 +323,2 @@ // Copyright Joyent, Inc. and other Node contributors.

exports.globalAgent = new Agent();
exports.globalAgent = new Agent();

@@ -1,9 +0,9 @@

/*!
/**!
* agentkeepalive - lib/agent.js
*
* refer:
* refer:
* * @atimb "Real keep-alive HTTP agent": https://gist.github.com/2963672
* * https://github.com/joyent/node/blob/master/lib/http.js
* * https://github.com/joyent/node/blob/master/lib/_http_agent.js
*
*
* Copyright(c) 2012 - 2013 fengmk2 <fengmk2@gmail.com>

@@ -32,6 +32,14 @@ * MIT Licensed

var OriginalAgent = http.Agent;
if (process.version.indexOf('v0.8.') === 0 || process.version.indexOf('v0.10.') === 0) {
OriginalAgent = require('./_http_agent').Agent;
debug('%s use _http_agent', process.version);
}
function Agent(options) {
options = options || {};
options.keepAlive = options.keepAlive !== false;
options.keepAliveMsecs = options.keepAliveMsecs || options.maxKeepAliveTime;
http.Agent.call(this, options);
OriginalAgent.call(this, options);

@@ -111,3 +119,3 @@ var self = this;

util.inherits(Agent, http.Agent);
util.inherits(Agent, OriginalAgent);
module.exports = Agent;

@@ -117,3 +125,3 @@

var self = this;
var socket = http.Agent.prototype.createSocket.call(this, req, options);
var socket = OriginalAgent.prototype.createSocket.call(this, req, options);
socket._requestCount = 0;

@@ -135,3 +143,3 @@ if (self.keepAliveMsecs) {

Agent.prototype.removeSocket = function (s, options) {
http.Agent.prototype.removeSocket.call(this, s, options);
OriginalAgent.prototype.removeSocket.call(this, s, options);
var name = this.getName(options);

@@ -138,0 +146,0 @@ debug('removeSocket', name, 'destroyed:', s.destroyed);

{
"name": "agentkeepalive",
"version": "0.2.1",
"version": "0.2.2",
"description": "Missing keepalive http.Agent",

@@ -35,5 +35,5 @@ "main": "index.js",

},
"engines": { "node": ">= 0.11.8" },
"engines": { "node": ">= 0.8.0" },
"author": "fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)",
"license": "MIT"
}

@@ -1,3 +0,7 @@

# agentkeepalive [![Build Status](https://secure.travis-ci.org/TBEDP/agentkeepalive.png?branch=master)](http://travis-ci.org/TBEDP/agentkeepalive) [![Coverage Status](https://coveralls.io/repos/TBEDP/agentkeepalive/badge.png)](https://coveralls.io/r/TBEDP/agentkeepalive)
# agentkeepalive
[![Build Status](https://secure.travis-ci.org/TBEDP/agentkeepalive.png?branch=master)](http://travis-ci.org/TBEDP/agentkeepalive) [![Coverage Status](https://coveralls.io/repos/TBEDP/agentkeepalive/badge.png)](https://coveralls.io/r/TBEDP/agentkeepalive)
[![NPM](https://nodei.co/npm/agentkeepalive.png?downloads=true)](https://nodei.co/npm/agentkeepalive/)
![logo](https://raw.github.com/TBEDP/agentkeepalive/master/logo.png)

@@ -156,9 +160,12 @@

```
project: agentkeepalive
commits: 24
active : 10 days
files : 20
authors:
22 fengmk2 91.7%
2 Will White 8.3%
$ git summary
project : agentkeepalive
repo age : 1 year, 3 months
active : 17 days
commits : 36
files : 26
authors :
34 fengmk2 94.4%
2 Will White 5.6%
```

@@ -171,3 +178,3 @@

## License
## License

@@ -174,0 +181,0 @@ (The MIT License)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc