{"_id":"yakaa","_rev":"1759731","name":"yakaa","description":"Yet Another Keep-Alive Agent","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"newrelic","email":"nodejs@newrelic.com"},{"name":"cnd","email":"chasedouglas@gmail.com"},{"name":"wraithan","email":"xwraithanx@gmail.com"},{"name":"hayes","email":"michael@hayes.io"}],"time":{"modified":"2026-11-23T09:16:07.000Z","created":"2014-03-07T22:51:53.062Z","1.0.1":"2015-01-09T17:05:47.291Z","1.0.0":"2014-04-09T23:31:34.221Z","0.0.1":"2014-03-07T23:00:19.066Z","0.0.0":"2014-03-07T22:51:53.062Z"},"users":{"yeahoffline":true,"xiongjia":true},"author":{"name":"Forrest L Norvell","email":"forrest@newrelic.com"},"repository":{"url":"https://github.com/newrelic/yakaa","type":"git"},"versions":{"1.0.1":{"name":"yakaa","version":"1.0.1","keywords":["keep-alive","agent","http","https","client","extraction"],"author":{"name":"Forrest L Norvell","email":"forrest@newrelic.com"},"license":"MIT","_id":"yakaa@1.0.1","maintainers":[{"name":"newrelic","email":"nodejs@newrelic.com"},{"name":"cnd","email":"chasedouglas@gmail.com"},{"name":"wraithan","email":"xwraithanx@gmail.com"},{"name":"hayes","email":"michael@hayes.io"}],"homepage":"https://github.com/newrelic/yakaa","bugs":{"url":"https://github.com/newrelic/yakaa/issues"},"dist":{"shasum":"3ecaae72f3d089da58089403126204cec772e60a","tarball":"http://registry-npm.ywwl.com/yakaa/download/yakaa-1.0.1.tgz","integrity":"sha512-dIOa1OkW5gWzIUR3bqYcw50Ib31zYRisvOtLeeTAkEu5z+VIjQy/qDIj/9NThcjDCgNIfX4ZKoIePJMRMQjyPw==","signatures":[{"sig":"MEUCIQC2fneJb9nN5uofCQQ6FsyBGu/Uccl/cWvrgP4TfxmiWgIgXcgA0wDY4gkqzD4ZIgrqOOF0xtCY2yOd0s9Fjiq4Lu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":8616,"noattachment":false,"key":"/yakaa/-/yakaa-1.0.1.tgz"},"main":"index.js","_from":".","_shasum":"3ecaae72f3d089da58089403126204cec772e60a","gitHead":"8574311a6e35da5122eecef145df386eaa4a6d5e","scripts":{"test":"tap test"},"_npmUser":{"name":"wraithan","email":"xwraithanx@gmail.com"},"repository":{"url":"https://github.com/newrelic/yakaa","type":"git"},"_npmVersion":"2.1.5","description":"Yet Another Keep-Alive Agent","_nodeVersion":"0.8.28","devDependencies":{"tap":"^0.4.8"},"directories":{},"deprecated":"This package is no longer supported.","publish_time":1420823147291,"_cnpm_publish_time":1420823147291},"1.0.0":{"name":"yakaa","version":"1.0.0","keywords":["keep-alive","agent","http","https","client","extraction"],"author":{"name":"Forrest L Norvell","email":"forrest@newrelic.com"},"license":"MIT","_id":"yakaa@1.0.0","maintainers":[{"name":"newrelic","email":"nodejs@newrelic.com"}],"homepage":"https://github.com/newrelic/yakaa","bugs":{"url":"https://github.com/newrelic/yakaa/issues"},"dist":{"shasum":"6b60fde70cd4633ee9e09663b2ef0cf60b197b94","tarball":"http://registry-npm.ywwl.com/yakaa/download/yakaa-1.0.0.tgz","integrity":"sha512-SaiPu7kcfs9H0KvWkrZWxLZZFyTtzF871P1AnUoYT1MumF7CQcs27b3hb7QWxlSrsGITLKRAfNEs3p1CuZbr2A==","signatures":[{"sig":"MEUCIQC1WIpIW8vvPOxw5zbO7NI8jUSRLktpCg89vePv80OUWQIgJ6UvHMzY1XaqpDT9XjiWLDVLukctjHAIdbpzblZLW0E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":8582,"noattachment":false,"key":"/yakaa/-/yakaa-1.0.0.tgz"},"main":"index.js","_from":".","scripts":{"test":"tap test"},"_npmUser":{"name":"newrelic","email":"nodejs@newrelic.com"},"repository":{"url":"https://github.com/newrelic/yakaa","type":"git"},"_npmVersion":"1.4.4","description":"Yet Another Keep-Alive Agent","devDependencies":{"tap":"^0.4.8"},"directories":{},"deprecated":"This package is no longer supported.","publish_time":1397086294221,"_cnpm_publish_time":1397086294221},"0.0.1":{"name":"yakaa","version":"0.0.1","keywords":["keep-alive","agent","http","https","client","extraction"],"author":{"name":"Forrest L Norvell","email":"forrest@newrelic.com"},"license":"MIT","_id":"yakaa@0.0.1","maintainers":[{"name":"newrelic","email":"nodejs@newrelic.com"}],"homepage":"https://github.com/newrelic/yakaa","bugs":{"url":"https://github.com/newrelic/yakaa/issues"},"dist":{"shasum":"179955a1d3f52e67f8467ee6ec8e30d5b590c06f","tarball":"http://registry-npm.ywwl.com/yakaa/download/yakaa-0.0.1.tgz","integrity":"sha512-e8XQS5N7oNOy0SUURCzfkvhU6po8lyoJCk+1JV2z+myAay09oo4FcnkA008ZpWrFc2VlPeMbln622ld7et9S8A==","signatures":[{"sig":"MEQCIBWddycJbwplyhWPjwbFkO6Hq5vFzO3CPzRCEOc6XaOeAiBA5H/MeQ3aYCWhvkpMJgb6WiWr/VazMJe2dXFyA0AIsw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":4534,"noattachment":false,"key":"/yakaa/-/yakaa-0.0.1.tgz"},"main":"index.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"newrelic","email":"nodejs@newrelic.com"},"repository":{"url":"https://github.com/newrelic/yakaa","type":"git"},"_npmVersion":"1.4.3","description":"Yet Another Keep-Alive Agent","directories":{},"deprecated":"This package is no longer supported.","publish_time":1394233219066,"_cnpm_publish_time":1394233219066},"0.0.0":{"name":"yakaa","version":"0.0.0","keywords":["keep-alive","agent","http","https","client","extraction"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxysz.net"},"license":"MIT","_id":"yakaa@0.0.0","maintainers":[{"name":"newrelic","email":"nodejs@newrelic.com"}],"homepage":"https://github.com/othiym23/yakaa","bugs":{"url":"https://github.com/othiym23/yakaa/issues"},"dist":{"shasum":"3bd7eba6544de27d5b140c8f1b612013a796fed8","tarball":"http://registry-npm.ywwl.com/yakaa/download/yakaa-0.0.0.tgz","integrity":"sha512-Ab/aq+VxqbBW9rcgDCHuR1n/rcdgUnfXgPGUNqyyyJjtlKDeAoLjM08ghUnuVRqWmD0IkVrRkekdD7iphTTZKw==","signatures":[{"sig":"MEUCIQDAOcZKJ+unbbfKC8QrxatJ4i39U3oh0gsWeHhuk8NwLQIgYNbrKrCL2nPtW7O81gjQw8M2od9s1MjsR+AAEBcIHio=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":4540,"noattachment":false,"key":"/yakaa/-/yakaa-0.0.0.tgz"},"main":"index.js","_from":".","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"newrelic","email":"nodejs@newrelic.com"},"repository":{"url":"https://github.com/othiym23/yakaa","type":"git"},"_npmVersion":"1.4.3","description":"Yet Another Keep-Alive Agent","directories":{},"deprecated":"This package is no longer supported.","publish_time":1394232713062,"_cnpm_publish_time":1394232713062}},"readme":"## yakaa: yet another keep-alive agent\n\nThis is an extracted copy of Node 0.12's keep-alive Agent implementation with\nsome small changes intended to make it work with older versions of Node. It\nalso has one extra feature, which I needed.\n\nThe HTTP Agent is used for pooling sockets used in HTTP client requests.\n\nThe HTTP Agent also defaults client requests to using Connection:keep-alive. If\nno pending HTTP requests are waiting on a socket to become free the socket is\nclosed. This means that Node's pool has the benefit of keep-alive when under\nload but still does not require developers to manually close the HTTP clients\nusing KeepAlive.\n\nIf you opt into using HTTP KeepAlive, you can create an Agent object with that\nflag set to `true`.  (See the [constructor options](#http_new_agent_options)\nbelow.)  Then, the Agent will keep unused sockets in a pool for later use.\nThey will be explicitly marked so as to not keep the Node process running.\nHowever, it is still a good idea to explicitly\n[`destroy()`](#http_agent_destroy) KeepAlive agents when they are no longer in\nuse, so that the Sockets will be shut down.\n\nSockets are removed from the agent's pool when the socket emits either a\n\"close\" event or a special \"agentRemove\" event. This means that if you intend\nto keep one HTTP request open for a long time and don't want it to stay in the\npool you can do something along the lines of:\n\n    http.get(options, function(res) {\n      // Do stuff\n    }).on(\"socket\", function (socket) {\n      socket.emit(\"agentRemove\");\n    });\n\n### var Agent = require('yakaa'); new Agent([options])\n\n* `options` {Object} Set of configurable options to set on the agent.\n  Can have the following fields:\n  * `keepAlive` {Boolean} Keep sockets around in a pool to be used by\n    other requests in the future. Default = `false`\n  * `keepAliveMsecs` {Integer} When using HTTP KeepAlive, how often\n    to send TCP KeepAlive packets over sockets being kept alive.\n    Default = `1000`.  Only relevant if `keepAlive` is set to `true`.\n  * **ADDED** `keepAliveTimeoutMsecs` {Integer} When using HTTP KeepAlive, how\n    long to keep the socket connected without activity before it gets reaped.\n  * `maxSockets` {Number} Maximum number of sockets to allow per\n    host.  Default = `Infinity`.\n  * `maxFreeSockets` {Number} Maximum number of sockets to leave open\n    in a free state.  Only relevant if `keepAlive` is set to `true`.\n    Default = `256`.\n\nThe default `http.globalAgent` that is used by `http.request` has all\nof these values set to their respective defaults.\n\nTo configure any of them, you must create your own `Agent` object.\n\n```javascript\nvar http = require('http');\nvar Agent = require('yakaa');\nvar keepAliveAgent = new Agent({ keepAlive: true });\nkeepAliveAgent.request(options, onResponseCallback);\n```\n\n### agent.maxSockets\n\nBy default set to Infinity. Determines how many concurrent sockets the agent\ncan have open per origin. Origin is either a 'host:port' or\n'host:port:localAddress' combination.\n\n### agent.maxFreeSockets\n\nBy default set to 256.  For Agents supporting HTTP KeepAlive, this\nsets the maximum number of sockets that will be left open in the free\nstate.\n\n### agent.sockets\n\nAn object which contains arrays of sockets currently in use by the\nAgent.  Do not modify.\n\n### agent.freeSockets\n\nAn object which contains arrays of sockets currently awaiting use by\nthe Agent when HTTP KeepAlive is used.  Do not modify.\n\n### agent.requests\n\nAn object which contains queues of requests that have not yet been assigned to\nsockets. Do not modify.\n\n### agent.destroy()\n\nDestroy any sockets that are currently in use by the agent.\n\nIt is usually not necessary to do this.  However, if you are using an\nagent with KeepAlive enabled, then it is best to explicitly shut down\nthe agent when you know that it will no longer be used.  Otherwise,\nsockets may hang open for quite a long time before the server\nterminates them.\n\n### agent.getName(options)\n\nGet a unique name for a set of request options, to determine whether a\nconnection can be reused.  In the http agent, this returns\n`host:port:localAddress`.  In the https agent, the name includes the\nCA, cert, ciphers, and other HTTPS/TLS-specific options that determine\nsocket reusability.\n\n\n## new Agent.SSL(options)\n\nAn Agent object for HTTPS similar to Agent.\n\n`options` is an object. All options from Agent are valid.\n\nThe following options from [tls.connect()][] can also be used.\n\n- `pfx`: Certificate, Private key and CA certificates to use for SSL. Default `null`.\n- `key`: Private key to use for SSL. Default `null`.\n- `passphrase`: A string of passphrase for the private key or pfx. Default `null`.\n- `cert`: Public x509 certificate to use. Default `null`.\n- `ca`: An authority certificate or array of authority certificates to check\n  the remote host against.\n- `ciphers`: A string describing the ciphers to use or exclude. Consult\n  <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT> for\n  details on the format.\n- `rejectUnauthorized`: If `true`, the server certificate is verified against\n  the list of supplied CAs. An `'error'` event is emitted if verification\n  fails. Verification happens at the connection level, *before* the HTTP\n  request is sent. Default `true`.\n- `secureProtocol`: The SSL method to use, e.g. `SSLv3_method` to force\n  SSL version 3. The possible values depend on your installation of\n  OpenSSL and are defined in the constant [SSL_METHODS][].\n\nExample:\n\n```js\nvar SSLAgent = require('yakaa').SSL;\n\nvar options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),\n  cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')\n};\noptions.agent = new SSLAgent(options);\n```\n\n### LICENSE\n\nSee LICENSE in this distribution. As code derived from Node's source, it's\ngoverned by the same license as Node itself.\n","_attachments":{},"homepage":"https://github.com/newrelic/yakaa","bugs":{"url":"https://github.com/newrelic/yakaa/issues"},"license":"MIT"}