{"name":"libp2p-spdy","version":"0.13.2","description":"SPDY 3.1 implementation wrapper that is compatible with libp2p Stream Muxer expected interface","leadMaintainer":"Jacob Heun <jacobheun@gmail.com>","main":"src/index.js","scripts":{"lint":"aegir lint","build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","release":"aegir release","release-minor":"aegir release --type minor","release-major":"aegir release --type major","coverage":"aegir coverage","coverage-publish":"aegir-coverage publish"},"pre-push":["lint"],"repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-spdy.git"},"keywords":["IPFS"],"license":"MIT","bugs":{"url":"https://github.com/libp2p/js-libp2p-spdy/issues"},"homepage":"https://github.com/libp2p/js-libp2p-spdy","engines":{"node":">=6.0.0","npm":">=3.0.0"},"devDependencies":{"aegir":"^18.2.1","chai":"^4.2.0","chai-checkmark":"^1.0.1","dirty-chai":"^2.0.1","interface-stream-muxer":"~0.6.0","libp2p-tcp":"~0.13.0","libp2p-websockets":"~0.12.2","multiaddr":"^6.0.6","pull-file":"^1.1.0","pull-pair":"^1.1.0","run-parallel":"^1.1.9","sinon":"^7.2.7","tap-spec":"^4.1.1","tape":"^4.10.1"},"dependencies":{"debug":"^4.1.1","interface-connection":"~0.3.3","once":"^1.4.0","pull-catch":"^1.0.1","pull-stream":"^3.6.9","pull-stream-to-stream":"^1.3.4","spdy-transport":"^3.0.0","stream-to-pull-stream":"^1.7.2"},"contributors":[{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"Jacob Heun","email":"jake@andyet.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"greenkeeperio-bot","email":"support@greenkeeper.io"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"npmcdn-to-unpkg-bot","email":"npmcdn-to-unpkg-bot@users.noreply.github.com"},{"name":"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ","email":"victorbjelkholm@gmail.com"}],"gitHead":"20198d16893c3ba07d7965ae881992663a7ca7f4","_id":"libp2p-spdy@0.13.2","_nodeVersion":"10.15.3","_npmVersion":"6.8.0","dist":{"integrity":"sha512-/8IqfRCnsyU4gbGpiiCcMLihjtx/UJQBw6LOa5m9z+Hnnivq71zfaIXPXR8fDjGnFg8ERzHTWi0dJE8yTCde9w==","shasum":"503e72d87b7e12359038f02ff75a014ab2987c2a","tarball":"http://registry-npm.ywwl.com/libp2p-spdy/download/libp2p-spdy-0.13.2.tgz","fileCount":7,"unpackedSize":16002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcj3QCCRA9TVsSAnZWagAA3jwQAKUNhRu9z/HAQLeyX3DQ\nsMcQ0Q6jfWlU6JbUQQK0zc+eKfeD+JABhlI6B5AJbJlmL/ugfQt80ZSGw82R\nl8bGYUTZRkOeuCBXcmz7tExGuVsZFoKskBnhLrTh/Hd/nQGJVCt8Ha5HmhVV\nwirioUca650jHKNc9vT+pM2kOrSbYSHKa6RjTq2d6wE2XxyvKHMehXhxVsgT\n+746Da8W1H4ntMi9KjxlJlGYDX9HeELV0g0AB7gKWq5R6oB9BmBy2ns/bS+n\nU2899+u16OfxMfh3ScIdhOBHGOx5AolyeP+8eIS35/h3DoOin67huKMJ2YMk\nzHdhQX50etcRsYjPA6mKY+wQ6JPhjucK4kUQ0GaWznm/0wZXyfl0r11WhT80\nlVWhDxYmywHnFOl5rM8iUSCSVxA2qc3wuH4a3yXkNAnEZWDCZXssmswabhHe\n2seSo7zeILHN3RWxOZ+ndgfmeNhJuMgH/ufAa7Sxtfra8Ol32wrMaAXwW2WP\nYgKdZAVaM8GyrNy5XOHOH/WsJ3MO415Ib1KS2Rsi/R+JPMvtP3+Wm4dQCmtx\nY68f1xUUoGS15hHxN4gSNtt5XGb3nxwgNLP/DAdN5+MCBlRpydc1iITOGNFH\ndy6WrxQZMwWBueM3szUtP5lMW/qd+I6S4ropm4+lFLLz2B7lg0to2U3b5g6S\n8OeQ\r\n=xMaw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEhTbaVl4EHYjz+jWWVoLbskPnx6b80aQnADxt0uB3glAiA2dow+B4DkrWu5GKbJ3IUKGw2I8aHUVEPn10wB79cJDQ=="}],"size":5471,"noattachment":false,"key":"/libp2p-spdy/-/libp2p-spdy-0.13.2.tgz"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"},{"name":"dignifiedquire","email":"dignifiedquire@gmail.com"}],"_npmUser":{"name":"jacobheun","email":"jacobheun@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libp2p-spdy_0.13.2_1552905218199_0.033205715662599555"},"_hasShrinkwrap":false,"deprecated":"No longer maintained, please use libp2p-mplex instead","readme":"js-libp2p-spdy\n==============\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)\n[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Coverage Status](https://coveralls.io/repos/github/libp2p/js-libp2p-spdy/badge.svg?branch=master)](https://coveralls.io/github/libp2p/js-libp2p-spdy?branch=master)\n[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-spdy.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-spdy)\n[![Travis CI](https://travis-ci.org/libp2p/js-libp2p-spdy.svg?branch=master)](https://travis-ci.org/libp2p/js-libp2p-spdy)\n[![Circle CI](https://circleci.com/gh/libp2p/js-libp2p-spdy.svg?style=svg)](https://circleci.com/gh/libp2p/js-libp2p-spdy)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)\n![](https://img.shields.io/badge/Node.js-%3E%3D6.0.0-orange.svg?style=flat-square)\n\n> SPDY 3.1 implementation wrapper that is compatible with libp2p Stream Muxer expected interface\n\n[![](https://github.com/libp2p/interface-stream-muxer/raw/master/img/badge.png)](https://github.com/libp2p/interface-stream-muxer)\n\n## Lead Maintainer\n\n[Jacob Heun](https://github/jacobheun)\n\n## Installation\n\n### npm\n\n```sh\n> npm i libp2p-spdy\n```\n\n### Use in Node.js\n\n```js\nconst spdy = require('libp2p-spdy')\n```\n\n### Use in a browser with browserify, webpack or any other bundler\n\nThe code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.\n\n```JavaScript\nvar spdy = require('libp2p-spdy')\n```\n\n### Use in a browser Using a script tag\n\nLoading this module through a script tag will make the `Lip2pSpdy` obj available in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/libp2p-spdy/dist/index.min.js\"></script>\n<!-- OR -->\n<script src=\"https://unpkg.com/libp2p-spdy/dist/index.js\"></script>\n```\n\n## Usage\n\n### API\n\n#### Attaching it to a socket (duplex stream)\n\n**As a listener**\n\n```JavaScript\nconst listener = spdy(conn, true)\n```\n\n**As a dialer**\n\n```JavaScript\nconst dialer = spdy(conn, false)\n```\n\n#### Opening a multiplex duplex stream\n\n```JavaScript\nconst conn = dialer.newStream((err, conn) => {})\n\nconn.on('error', (err) => {})\n```\n\nnote: Works the same on the listener side\n\n#### Receiving incoming stream\n\n```JavaScript\ndialer.on('stream', (conn) => {})\n```\n\nnote: Works the same on the listener side\n\n#### Close\n\n```JavaScript\ndialer.close()\n```\n\nnote: Works the same on the listener side\n\n#### Other events\n\n```JavaScript\ndialer.on('close', () => {})\ndialer.on('error', () => {})\n```\n\nnote: Works the same on the listener side\n\n### This module uses `pull-streams`\n\nWe expose a streaming interface based on `pull-streams`, rather then on the Node.js core streams implementation (aka Node.js streams). `pull-streams` offers us a better mechanism for error handling and flow control guarantees. If you would like to know more about why we did this, see the discussion at this [issue](https://github.com/ipfs/js-ipfs/issues/362).\n\nYou can learn more about pull-streams at:\n\n- [The history of Node.js streams, nodebp April 2014](https://www.youtube.com/watch?v=g5ewQEuXjsQ)\n- [The history of streams, 2016](http://dominictarr.com/post/145135293917/history-of-streams)\n- [pull-streams, the simple streaming primitive](http://dominictarr.com/post/149248845122/pull-streams-pull-streams-are-a-very-simple)\n- [pull-streams documentation](https://pull-stream.github.io/)\n\n#### Converting `pull-streams` to Node.js Streams\n\nIf you are a Node.js streams user, you can convert a pull-stream to a Node.js stream using the module [`pull-stream-to-stream`](https://github.com/pull-stream/pull-stream-to-stream), giving you an instance of a Node.js stream that is linked to the pull-stream. For example:\n\n```js\nconst pullToStream = require('pull-stream-to-stream')\n\nconst nodeStreamInstance = pullToStream(pullStreamInstance)\n// nodeStreamInstance is an instance of a Node.js Stream\n```\n\nTo learn more about this utility, visit https://pull-stream.github.io/#pull-stream-to-stream.\n\n\n","publish_time":1552905218372,"_cnpm_publish_time":1552905218372,"dist-tags":{"latest":"0.13.3"}}