Name: js-handler/node_modules/restify/node_modules/spdy/package.json
| 1: | { |
| 2: | "name": "spdy", |
| 3: | "version": "1.8.2", |
| 4: | "description": "Implementation of the SPDY protocol on node.js.", |
| 5: | "keywords": [ |
| 6: | "spdy" |
| 7: | ], |
| 8: | "repository": { |
| 9: | "type": "git", |
| 10: | "url": "git://github.com/indutny/node-spdy.git" |
| 11: | }, |
| 12: | "homepage": "https://github.com/indutny/node-spdy", |
| 13: | "bugs": { |
| 14: | "url": "https://github.com/indunty/node-spdy/issues", |
| 15: | "email": "[email protected]" |
| 16: | }, |
| 17: | "author": { |
| 18: | "name": "Fedor Indutny", |
| 19: | "email": "[email protected]" |
| 20: | }, |
| 21: | "contributors": [ |
| 22: | { |
| 23: | "name": "Chris Storm", |
| 24: | "email": "[email protected]" |
| 25: | }, |
| 26: | { |
| 27: | "name": "François de Metz", |
| 28: | "email": "[email protected]" |
| 29: | }, |
| 30: | { |
| 31: | "name": "Ilya Grigorik", |
| 32: | "email": "[email protected]" |
| 33: | }, |
| 34: | { |
| 35: | "name": "Roberto Peon" |
| 36: | }, |
| 37: | { |
| 38: | "name": "Tatsuhiro Tsujikawa" |
| 39: | }, |
| 40: | { |
| 41: | "name": "Jesse Cravens", |
| 42: | "email": "[email protected]" |
| 43: | } |
| 44: | ], |
| 45: | "dependencies": {}, |
| 46: | "devDependencies": { |
| 47: | "mocha": "1.3.x" |
| 48: | }, |
| 49: | "scripts": { |
| 50: | "test": "mocha --ui tdd --growl --reporter spec test/unit/*-test.js" |
| 51: | }, |
| 52: | "engines": [ |
| 53: | "node >= 0.7.0" |
| 54: | ], |
| 55: | "main": "./lib/spdy", |
| 56: | "optionalDependencies": {}, |
| 57: | "readme": "# SPDY Server for node.js [](http://travis-ci.org/indutny/node-spdy)\n\n<a href=\"http://flattr.com/thing/758213/indutnynode-spdy-on-GitHub\" target=\"_blank\">\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\n\nWith this module you can create [SPDY](http://www.chromium.org/spdy) servers\nin node.js with natural http module interface and fallback to regular https\n(for browsers that doesn't support SPDY yet).\n\n## Usage\n\n```javascript\nvar spdy = require('spdy'),\n fs = require('fs');\n\nvar options = {\n key: fs.readFileSync(__dirname + '/keys/spdy-key.pem'),\n cert: fs.readFileSync(__dirname + '/keys/spdy-cert.pem'),\n ca: fs.readFileSync(__dirname + '/keys/spdy-csr.pem'),\n\n // SPDY-specific options\n windowSize: 1024, // Server's window size\n};\n\nvar server = spdy.createServer(options, function(req, res) {\n res.writeHead(200);\n res.end('hello world!');\n});\n\nserver.listen(443);\n```\n\nAnd by popular demand - usage with\n[express](https://github.com/visionmedia/express):\n\n```javascript\nvar spdy = require('spdy'),\n express = require('express'),\n fs = require('fs');\n\nvar options = { /* the same as above */ };\n\nvar app = express();\n\napp.use(/* your favorite middleware */);\n\nvar server = spdy.createServer(options, app);\n\nserver.listen(443);\n```\n\n## API\n\nAPI is compatible with `http` and `https` module, but you can use another\nfunction as base class for SPDYServer.\n\n```javascript\nspdy.createServer(\n [base class constructor, i.e. https.Server],\n { /* keys and options */ }, // <- the only one required argument\n [request listener]\n).listen([port], [host], [callback]);\n```\n\nRequest listener will receive two arguments: `request` and `response`. They're\nboth instances of `http`'s `IncomingMessage` and `OutgoingMessage`. But three\ncustom properties are added to both of them: `streamID`, `isSpdy`,\n`spdyVersion`. The first one indicates on which spdy stream are sitting request\nand response. Second is always true and can be checked to ensure that incoming\nrequest wasn't received by HTTPS fallback and last one is a number representing\nused SPDY protocol version (2 or 3 for now).\n\n### Push streams\n\nIt is possible to initiate 'push' streams to send content to clients _before_\nthe client requests it.\n\n```javascript\nspdy.createServer(options, function(req, res) {\n var headers = { 'content-type': 'application/javascript' };\n res.push('/main.js', headers, function(err, stream) {\n if (err) return;\n\n stream.end('alert(\"hello from push stream!\");');\n });\n\n res.end('<script src=\"/main.js\"></script>');\n}).listen(443);\n```\n\nPush is accomplished via the `push()` method invoked on the current response\nobject (this works for express.js response objects as well). The format of the\n`push()` method is:\n\n`.push('full or relative url', { ... headers ... }, optional priority, callback)`\n\nYou can use either full ( `http://host/path` ) or relative ( `/path` ) urls with\n`.push()`. `headers` are the same as for regular response object. `callback`\nwill receive two arguments: `err` (if any error is happened) and `stream`\n(stream object have API compatible with a\n[net.Socket](http://nodejs.org/docs/latest/api/net.html#net.Socket) ).\n\n### Options\n\nAll options supported by\n[tls](http://nodejs.org/docs/latest/api/tls.html#tls.createServer) are working\nwith node-spdy. In addition, `maxStreams` options is available. it allows you\ncontrolling [maximum concurrent streams][http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2#TOC-SETTINGS]\nprotocol option (if client will start more streams than that limit, RST_STREAM\nwill be sent for each additional stream).\n\nAdditional options:\n\n* `plain` - if defined, server will accept only plain (non-encrypted)\n connections.\n\n#### Contributors\n\n* [Fedor Indutny](https://github.com/indutny)\n* [Chris Strom](https://github.com/eee-c)\n* [François de Metz](https://github.com/francois2metz)\n* [Ilya Grigorik](https://github.com/igrigorik)\n* [Roberto Peon](https://github.com/grmocg)\n* [Tatsuhiro Tsujikawa](https://github.com/tatsuhiro-t)\n* [Jesse Cravens](https://github.com/jessecravens)\n\n#### LICENSE\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2012.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n", |
| 58: | "readmeFilename": "README.md", |
| 59: | "_id": "[email protected]", |
| 60: | "dist": { |
| 61: | "shasum": "6c6551b8cfcd37dd04d360382578f3ac324eed1e" |
| 62: | }, |
| 63: | "_from": "[email protected]", |
| 64: | "_resolved": "https://registry.npmjs.org/spdy/-/spdy-1.8.2.tgz" |
| 65: | } |
