PageRenderTime 44ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/node_modules/sails-rest/node_modules/restify/node_modules/keep-alive-agent/package.json

https://github.com/bestdpf/avior-service
JSON | 48 lines | 48 code | 0 blank | 0 comment | 0 complexity | b85f2b3fe9fe781a2a2124a4d5c59016 MD5 | raw file
Possible License(s): MIT, Apache-2.0, BSD-3-Clause, MPL-2.0-no-copyleft-exception, BSD-2-Clause, JSON, 0BSD
  1. {
  2. "name": "keep-alive-agent",
  3. "version": "0.0.1",
  4. "description": "a keep-alive agent for http and https",
  5. "contributors": [
  6. {
  7. "name": "C J Silverio",
  8. "email": "ceejceej@gmail.com",
  9. "url": "http://ceejbot.tumblr.com/"
  10. },
  11. {
  12. "name": "Danny Coates",
  13. "email": "dannycoates@gmail.com",
  14. "url": "https://github.com/dannycoates/"
  15. }
  16. ],
  17. "main": "index.js",
  18. "scripts": {
  19. "test": "mocha -R spec test/*.js"
  20. },
  21. "repository": {
  22. "type": "git",
  23. "url": "git://github.com/ceejbot/keep-alive-agent.git"
  24. },
  25. "keywords": [
  26. "keep-alive",
  27. "http",
  28. "https",
  29. "agent"
  30. ],
  31. "license": "MIT",
  32. "devDependencies": {
  33. "chai": "*",
  34. "mocha": "*"
  35. },
  36. "readme": "# keep-alive-agent\n\nkeep-alive-agent is an HTTP connection pool agent for node.js that re-uses sockets. It is simpler than some agents that also solve this problem because it does not attempt to replace the Agent provided by node. If you want to re-use connections, use this agent. If you want the default node behavior, use the default global agent.\n\n## Usage\n\n__new KeepAliveAgent(*options-hash*)__\n\nCreate an instance of the agent, passing the options hash through to the node Agent constructor. These options are in turn passed along to `createConnection()`. The KeepAliveAgent constructor does not use the options itself. The option you are most likely to change is `maxSockets`, which defaults to 5.\n\nTo use the agent instance, set it in the `agent` field of the options passed to `http.request()` or `http.get()`. See the [http.request() documentation](http://nodejs.org/api/http.html#http_http_request_options_callback) for details.\n\n__new KeepAliveAgent.Secure(*options-hash*)__\n\nA keep-alive agent that creates tls sockets. Use it the same way you use the http agent.\n\n## Examples\n\n```javascript\nvar http = require('http'),\n KeepAliveAgent = require('keep-alive-agent');\n\nvar getOptions = {\n hostname: 'twitter.com',\n port: 80,\n path: '/dshaw',\n agent: new KeepAliveAgent(),\n};\nhttp.get(getOptions, function(response)\n{\n\tresponse.pipe(process.stdout);\n});\n```\n\nTo re-use secure connections, use the Secure keep-alive agent:\n\n```javascript\nvar https = require('https'),\n KeepAliveAgent = require('keep-alive-agent');\n\nvar getOptions = {\n hostname: 'www.duckduckgo.com',\n port: 443,\n path: '/?q=unicorns',\n agent: new KeepAliveAgent.Secure(),\n};\nhttps.get(getOptions, function(response)\n{\n\tresponse.pipe(process.stdout);\n});\n```\n\n## See Also\n\nFor other implementations, see [agentkeepalive](https://github.com/TBEDP/agentkeepalive) and the [request](https://github.com/mikeal/request) module's [ForeverAgent](https://github.com/mikeal/request/blob/master/forever.js).\n\n## Licence\n\nMIT.\n",
  37. "readmeFilename": "README.md",
  38. "bugs": {
  39. "url": "https://github.com/ceejbot/keep-alive-agent/issues"
  40. },
  41. "homepage": "https://github.com/ceejbot/keep-alive-agent",
  42. "_id": "keep-alive-agent@0.0.1",
  43. "dist": {
  44. "shasum": "a117f54307f7b9d1239b315cfe1d22786f637fab"
  45. },
  46. "_from": "keep-alive-agent@0.0.1",
  47. "_resolved": "https://registry.npmjs.org/keep-alive-agent/-/keep-alive-agent-0.0.1.tgz"
  48. }