{"_id":"socket.io-client-pure","_rev":"246934","name":"socket.io-client-pure","description":"[![Build Status](https://secure.travis-ci.org/Automattic/socket.io-client.svg)](http://travis-ci.org/Automattic/socket.io-client) ![NPM version](https://badge.fury.io/js/socket.io-client.svg) ![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?","dist-tags":{"latest":"1.3.12"},"maintainers":[{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},{"name":"patocallaghan","email":"patocallaghan@gmail.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"time":{"modified":"2021-06-03T16:04:54.000Z","created":"2015-11-10T17:45:01.966Z","1.3.12":"2015-12-15T16:44:08.448Z","1.3.11":"2015-11-10T22:34:21.729Z","1.3.10":"2015-11-10T22:22:09.101Z","1.3.9":"2015-11-10T20:03:18.210Z","1.3.8":"2015-11-10T19:13:47.771Z","1.3.7":"2015-11-10T17:45:01.966Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/Automattic/socket.io-client.git"},"versions":{"1.3.12":{"name":"socket.io-client-pure","version":"1.3.12","keywords":["realtime","framework","websocket","tcp","events","client"],"dependencies":{"debug":"0.7.4","engine.io-client-pure":"1.5.9","component-bind":"1.0.0","component-emitter":"1.1.2","object-component":"0.0.3","socket.io-parser":"2.2.4","has-binary":"0.1.6","indexof":"0.0.1","parseuri":"0.0.2","to-array":"0.1.3","backo2":"1.0.2"},"devDependencies":{"socket.io":"1.3.7","mocha":"1.16.2","zuul":"github:rase-/zuul#9d3a02","istanbul":"0.2.1","expect.js":"0.2.0","uglify-js":"2.4.15","browserify":"4.2.1","base64-arraybuffer":"0.1.0","text-blob-builder":"0.0.1","has-cors":"1.0.3"},"scripts":{"test":"make test"},"contributors":[{"name":"Guillermo Rauch","email":"rauchg@gmail.com"},{"name":"Arnout Kazemier","email":"info@3rd-eden.com"},{"name":"Vladimir Dronnikov","email":"dronnikov@gmail.com"},{"name":"Einar Otto Stangvik","email":"einaros@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/Automattic/socket.io-client.git"},"license":"MIT","gitHead":"d2896fe1540f42d5de383f85235a16c2d11acc47","description":"[![Build Status](https://secure.travis-ci.org/Automattic/socket.io-client.svg)](http://travis-ci.org/Automattic/socket.io-client) ![NPM version](https://badge.fury.io/js/socket.io-client.svg) ![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?","bugs":{"url":"https://github.com/Automattic/socket.io-client/issues"},"homepage":"https://github.com/Automattic/socket.io-client#readme","_id":"socket.io-client-pure@1.3.12","_shasum":"613145967160830708713edfe2d9bb394c7dad22","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},"dist":{"shasum":"613145967160830708713edfe2d9bb394c7dad22","size":56146,"noattachment":false,"key":"/socket.io-client-pure/-/socket.io-client-pure-1.3.12.tgz","tarball":"http://registry.cnpm.dingdandao.com/socket.io-client-pure/download/socket.io-client-pure-1.3.12.tgz"},"maintainers":[{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},{"name":"patocallaghan","email":"patocallaghan@gmail.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"directories":{},"publish_time":1450197848448,"_cnpm_publish_time":1450197848448,"deprecated":"socket.io-client-pure is no longer maintained as the original socket.io removed all native dependencies. Please use the original.","_hasShrinkwrap":false},"1.3.11":{"name":"socket.io-client-pure","version":"1.3.11","keywords":["realtime","framework","websocket","tcp","events","client"],"dependencies":{"debug":"0.7.4","engine.io-client-pure":"1.5.8","component-bind":"1.0.0","component-emitter":"1.1.2","object-component":"0.0.3","socket.io-parser":"2.2.4","has-binary":"0.1.6","indexof":"0.0.1","parseuri":"0.0.2","to-array":"0.1.3","backo2":"1.0.2"},"devDependencies":{"socket.io":"1.3.7","mocha":"1.16.2","zuul":"github:rase-/zuul#9d3a02","istanbul":"0.2.1","expect.js":"0.2.0","uglify-js":"2.4.15","browserify":"4.2.1","base64-arraybuffer":"0.1.0","text-blob-builder":"0.0.1","has-cors":"1.0.3"},"scripts":{"test":"make test"},"contributors":[{"name":"Guillermo Rauch","email":"rauchg@gmail.com"},{"name":"Arnout Kazemier","email":"info@3rd-eden.com"},{"name":"Vladimir Dronnikov","email":"dronnikov@gmail.com"},{"name":"Einar Otto Stangvik","email":"einaros@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/Automattic/socket.io-client.git"},"license":"MIT","gitHead":"e9c6464ae10cbfca1bede864c26bf8e74c9c89b3","description":"[![Build Status](https://secure.travis-ci.org/Automattic/socket.io-client.svg)](http://travis-ci.org/Automattic/socket.io-client) ![NPM version](https://badge.fury.io/js/socket.io-client.svg) ![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?","bugs":{"url":"https://github.com/Automattic/socket.io-client/issues"},"homepage":"https://github.com/Automattic/socket.io-client#readme","_id":"socket.io-client-pure@1.3.11","_shasum":"6ab59bbf651199f7532ec45b6777ac61318308f8","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},"dist":{"shasum":"6ab59bbf651199f7532ec45b6777ac61318308f8","size":56252,"noattachment":false,"key":"/socket.io-client-pure/-/socket.io-client-pure-1.3.11.tgz","tarball":"http://registry.cnpm.dingdandao.com/socket.io-client-pure/download/socket.io-client-pure-1.3.11.tgz"},"maintainers":[{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},{"name":"patocallaghan","email":"patocallaghan@gmail.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"directories":{},"publish_time":1447194861729,"_cnpm_publish_time":1447194861729,"_hasShrinkwrap":false},"1.3.10":{"name":"socket.io-client-pure","version":"1.3.10","keywords":["realtime","framework","websocket","tcp","events","client"],"dependencies":{"debug":"0.7.4","engine.io-client-pure":"1.5.7","component-bind":"1.0.0","component-emitter":"1.1.2","object-component":"0.0.3","socket.io-parser":"2.2.4","has-binary":"0.1.6","indexof":"0.0.1","parseuri":"0.0.2","to-array":"0.1.3","backo2":"1.0.2"},"devDependencies":{"socket.io":"1.3.7","mocha":"1.16.2","zuul":"github:rase-/zuul#9d3a02","istanbul":"0.2.1","expect.js":"0.2.0","uglify-js":"2.4.15","browserify":"4.2.1","base64-arraybuffer":"0.1.0","text-blob-builder":"0.0.1","has-cors":"1.0.3"},"scripts":{"test":"make test"},"contributors":[{"name":"Guillermo Rauch","email":"rauchg@gmail.com"},{"name":"Arnout Kazemier","email":"info@3rd-eden.com"},{"name":"Vladimir Dronnikov","email":"dronnikov@gmail.com"},{"name":"Einar Otto Stangvik","email":"einaros@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/Automattic/socket.io-client.git"},"license":"MIT","gitHead":"800de60b3fd8a9240c7f265208eeb68b6c1bfddb","description":"[![Build Status](https://secure.travis-ci.org/Automattic/socket.io-client.svg)](http://travis-ci.org/Automattic/socket.io-client) ![NPM version](https://badge.fury.io/js/socket.io-client.svg) ![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?","bugs":{"url":"https://github.com/Automattic/socket.io-client/issues"},"homepage":"https://github.com/Automattic/socket.io-client#readme","_id":"socket.io-client-pure@1.3.10","_shasum":"ae7ae1855f409353e730f541ef5207a5408a4be6","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},"maintainers":[{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},{"name":"patocallaghan","email":"patocallaghan@gmail.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"dist":{"shasum":"ae7ae1855f409353e730f541ef5207a5408a4be6","size":56249,"noattachment":false,"key":"/socket.io-client-pure/-/socket.io-client-pure-1.3.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/socket.io-client-pure/download/socket.io-client-pure-1.3.10.tgz"},"directories":{},"publish_time":1447194129101,"_cnpm_publish_time":1447194129101,"_hasShrinkwrap":false},"1.3.9":{"name":"socket.io-client-pure","version":"1.3.9","keywords":["realtime","framework","websocket","tcp","events","client"],"dependencies":{"debug":"0.7.4","engine.io-client-pure":"1.5.6","component-bind":"1.0.0","component-emitter":"1.1.2","object-component":"0.0.3","socket.io-parser":"2.2.4","has-binary":"0.1.6","indexof":"0.0.1","parseuri":"0.0.2","to-array":"0.1.3","backo2":"1.0.2"},"devDependencies":{"socket.io":"1.3.7","mocha":"1.16.2","zuul":"github:rase-/zuul#9d3a02","istanbul":"0.2.1","expect.js":"0.2.0","uglify-js":"2.4.15","browserify":"4.2.1","base64-arraybuffer":"0.1.0","text-blob-builder":"0.0.1","has-cors":"1.0.3"},"scripts":{"test":"make test"},"contributors":[{"name":"Guillermo Rauch","email":"rauchg@gmail.com"},{"name":"Arnout Kazemier","email":"info@3rd-eden.com"},{"name":"Vladimir Dronnikov","email":"dronnikov@gmail.com"},{"name":"Einar Otto Stangvik","email":"einaros@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/Automattic/socket.io-client.git"},"license":"MIT","gitHead":"f88504924b7f1662f8e9d4e031fedfe998afd05e","description":"[![Build Status](https://secure.travis-ci.org/Automattic/socket.io-client.svg)](http://travis-ci.org/Automattic/socket.io-client) ![NPM version](https://badge.fury.io/js/socket.io-client.svg) ![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?","bugs":{"url":"https://github.com/Automattic/socket.io-client/issues"},"homepage":"https://github.com/Automattic/socket.io-client#readme","_id":"socket.io-client-pure@1.3.9","_shasum":"dbe475817052daf5e7c6318b96b2669136401c4e","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},"maintainers":[{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},{"name":"patocallaghan","email":"patocallaghan@gmail.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"dist":{"shasum":"dbe475817052daf5e7c6318b96b2669136401c4e","size":61215,"noattachment":false,"key":"/socket.io-client-pure/-/socket.io-client-pure-1.3.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/socket.io-client-pure/download/socket.io-client-pure-1.3.9.tgz"},"directories":{},"publish_time":1447185798210,"_cnpm_publish_time":1447185798210,"_hasShrinkwrap":false},"1.3.8":{"name":"socket.io-client-pure","version":"1.3.8","keywords":["realtime","framework","websocket","tcp","events","client"],"dependencies":{"debug":"0.7.4","engine.io-client-pure":"1.5.5","component-bind":"1.0.0","component-emitter":"1.1.2","object-component":"0.0.3","socket.io-parser":"2.2.4","has-binary":"0.1.6","indexof":"0.0.1","parseuri":"0.0.2","to-array":"0.1.3","backo2":"1.0.2"},"devDependencies":{"socket.io":"1.3.7","mocha":"1.16.2","zuul":"github:rase-/zuul#9d3a02","istanbul":"0.2.1","expect.js":"0.2.0","uglify-js":"2.4.15","browserify":"4.2.1","base64-arraybuffer":"0.1.0","text-blob-builder":"0.0.1","has-cors":"1.0.3"},"scripts":{"test":"make test"},"contributors":[{"name":"Guillermo Rauch","email":"rauchg@gmail.com"},{"name":"Arnout Kazemier","email":"info@3rd-eden.com"},{"name":"Vladimir Dronnikov","email":"dronnikov@gmail.com"},{"name":"Einar Otto Stangvik","email":"einaros@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/Automattic/socket.io-client.git"},"license":"MIT","gitHead":"0a610116fa7c53cdf0320a50ac44f221738dc0f4","description":"[![Build Status](https://secure.travis-ci.org/Automattic/socket.io-client.svg)](http://travis-ci.org/Automattic/socket.io-client) ![NPM version](https://badge.fury.io/js/socket.io-client.svg) ![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?","bugs":{"url":"https://github.com/Automattic/socket.io-client/issues"},"homepage":"https://github.com/Automattic/socket.io-client#readme","_id":"socket.io-client-pure@1.3.8","_shasum":"388d3805cd71988df85c6e0ea9d2d9b275bb9c02","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},"maintainers":[{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},{"name":"patocallaghan","email":"patocallaghan@gmail.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"dist":{"shasum":"388d3805cd71988df85c6e0ea9d2d9b275bb9c02","size":56248,"noattachment":false,"key":"/socket.io-client-pure/-/socket.io-client-pure-1.3.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/socket.io-client-pure/download/socket.io-client-pure-1.3.8.tgz"},"directories":{},"publish_time":1447182827771,"_cnpm_publish_time":1447182827771,"_hasShrinkwrap":false},"1.3.7":{"name":"socket.io-client-pure","description":"A fork of socket.io-client without the native dependencies","version":"1.3.7","keywords":["realtime","framework","websocket","tcp","events","client"],"dependencies":{"debug":"0.7.4","engine.io-client":"git+https://github.com/socketio/engine.io-client#da24c1f","component-bind":"1.0.0","component-emitter":"1.1.2","object-component":"0.0.3","socket.io-parser":"2.2.4","has-binary":"0.1.6","indexof":"0.0.1","parseuri":"0.0.2","to-array":"0.1.3","backo2":"1.0.2"},"devDependencies":{"socket.io":"1.3.7","mocha":"1.16.2","zuul":"git+https://github.com/rase-/zuul#9d3a02","istanbul":"0.2.1","expect.js":"0.2.0","uglify-js":"2.4.15","browserify":"4.2.1","base64-arraybuffer":"0.1.0","text-blob-builder":"0.0.1","has-cors":"1.0.3"},"scripts":{"test":"make test"},"contributors":[{"name":"Guillermo Rauch","email":"rauchg@gmail.com"},{"name":"Arnout Kazemier","email":"info@3rd-eden.com"},{"name":"Vladimir Dronnikov","email":"dronnikov@gmail.com"},{"name":"Einar Otto Stangvik","email":"einaros@gmail.com"}],"repository":{"type":"git","url":"https://github.com/patocallaghan/socket.io-client.git"},"license":"MIT","gitHead":"db6ec2914fb854795ef257aeec5a4e66e1a4013f","bugs":{"url":"https://github.com/patocallaghan/socket.io-client/issues"},"homepage":"https://github.com/patocallaghan/socket.io-client","_id":"socket.io-client-pure@1.3.7","_shasum":"5f8185d6ef326abcc4bd081fad60fdc41ecb2153","_from":"./","_npmVersion":"1.4.28","_npmUser":{"name":"patocallaghan","email":"patocallaghan@gmail.com"},"maintainers":[{"name":"johanneswuerbach","email":"johannes.wuerbach@googlemail.com"},{"name":"patocallaghan","email":"patocallaghan@gmail.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"dist":{"shasum":"5f8185d6ef326abcc4bd081fad60fdc41ecb2153","size":56222,"noattachment":false,"key":"/socket.io-client-pure/-/socket.io-client-pure-1.3.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/socket.io-client-pure/download/socket.io-client-pure-1.3.7.tgz"},"directories":{},"publish_time":1447177501966,"_cnpm_publish_time":1447177501966,"_hasShrinkwrap":false}},"readme":"\n# socket.io-client\n\n[![Build Status](https://secure.travis-ci.org/Automattic/socket.io-client.svg)](http://travis-ci.org/Automattic/socket.io-client)\n![NPM version](https://badge.fury.io/js/socket.io-client.svg)\n![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?style=flat)\n\n## How to use\n\nA standalone build of `socket.io-client` is exposed automatically by the\nsocket.io server as `/socket.io/socket.io.js`. Alternatively you can\nserve the file `socket.io.js` found at the root of this repository.\n\n```html\n<script src=\"/socket.io/socket.io.js\"></script>\n<script>\n  var socket = io('http://localhost');\n  socket.on('connect', function(){});\n  socket.on('event', function(data){});\n  socket.on('disconnect', function(){});\n</script>\n```\n\nSocket.IO is compatible with [browserify](http://browserify.org/).\n\n### Node.JS (server-side usage)\n\n  Add `socket.io-client` to your `package.json` and then:\n\n  ```js\n  var socket = require('socket.io-client')('http://localhost');\n  socket.on('connect', function(){});\n  socket.on('event', function(data){});\n  socket.on('disconnect', function(){});\n  ```\n\n## API\n\n### IO(url:String, opts:Object):Socket\n\n  Exposed as the `io` namespace in the standalone build, or the result\n  of calling `require('socket.io-client')`.\n\n  When called, it creates a new `Manager` for the given URL, and attempts\n  to reuse an existing `Manager` for subsequent calls, unless the\n  `multiplex` option is passed with `false`.\n\n  The rest of the options are passed to the `Manager` constructor (see below\n  for details).\n\n  A `Socket` instance is returned for the namespace specified by the\n  pathname in the URL, defaulting to `/`. For example, if the `url` is\n  `http://localhost/users`, a transport connection will be established to\n  `http://localhost` and a Socket.IO connection will be established to\n  `/users`.\n\n### IO#protocol\n\n  Socket.io protocol revision number this client works with.\n\n### IO#Socket\n\n  Reference to the `Socket` constructor.\n\n### IO#Manager\n\n  Reference to the `Manager` constructor.\n\n### IO#Emitter\n\n  Reference to the `Emitter` constructor.\n\n### Manager(url:String, opts:Object)\n\n  A `Manager` represents a connection to a given Socket.IO server. One or\n  more `Socket` instances are associated with the manager. The manager\n  can be accessed through the `io` property of each `Socket` instance.\n\n  The `opts` are also passed to `engine.io` upon initialization of the\n  underlying `Socket`.\n\n  Options:\n  - `reconnection` whether to reconnect automatically (`true`)\n  - `reconnectionAttempts` (`Infinity`) before giving up\n  - `reconnectionDelay` how long to initially wait before attempting a new\n    reconnection (`1000`). Affected by +/- `randomizationFactor`,\n    for example the default initial delay will be between 500 to 1500ms.\n  - `reconnectionDelayMax` maximum amount of time to wait between\n    reconnections (`5000`). Each attempt increases the reconnection delay by 2x\n    along with a randomization as above\n  - `randomizationFactor(`0.5`), 0 <= randomizationFactor <= 1\n  - `timeout` connection timeout before a `connect_error`\n    and `connect_timeout` events are emitted (`20000`)\n  - `autoConnect` by setting this false, you have to call `manager.open`\n    whenever you decide it's appropriate\n\n#### Events\n\n  - `connect`. Fired upon a successful connection.\n  - `connect_error`. Fired upon a connection error.\n    Parameters:\n      - `Object` error object\n  - `connect_timeout`. Fired upon a connection timeout.\n  - `reconnect`. Fired upon a successful reconnection.\n    Parameters:\n      - `Number` reconnection attempt number\n  - `reconnect_attempt`. Fired upon an attempt to reconnect.\n  - `reconnecting`. Fired upon an attempt to reconnect.\n    Parameters:\n      - `Number` reconnection attempt number\n  - `reconnect_error`. Fired upon a reconnection attempt error.\n    Parameters:\n      - `Object` error object\n  - `reconnect_failed`. Fired when couldn't reconnect within `reconnectionAttempts`\n\nThe events above are also emitted on the individual sockets that\nreconnect that depend on this `Manager`.\n\n### Manager#reconnection(v:Boolean):Manager\n\n  Sets the `reconnection` option, or returns it if no parameters\n  are passed.\n\n### Manager#reconnectionAttempts(v:Boolean):Manager\n\n  Sets the `reconnectionAttempts` option, or returns it if no parameters\n  are passed.\n\n### Manager#reconnectionDelay(v:Boolean):Manager\n\n  Sets the `reconectionDelay` option, or returns it if no parameters\n  are passed.\n\n### Manager#reconnectionDelayMax(v:Boolean):Manager\n\n  Sets the `reconectionDelayMax` option, or returns it if no parameters\n  are passed.\n\n### Manager#timeout(v:Boolean):Manager\n\n  Sets the `timeout` option, or returns it if no parameters\n  are passed.\n\n### Socket\n\n#### Socket#id:String\n\nA property on the `socket` instance that is equal to the underlying engine.io socket id.\n\nThe property is present once the socket has connected, is removed when the socket disconnects and is updated if the socket reconnects.\n\n#### Events\n\n  - `connect`. Fired upon a connection including a successful reconnection.\n  - `error`. Fired upon a connection error\n    Parameters:\n      - `Object` error data\n  - `disconnect`. Fired upon a disconnection.\n  - `reconnect`. Fired upon a successful reconnection.\n    Parameters:\n      - `Number` reconnection attempt number\n  - `reconnect_attempt`. Fired upon an attempt to reconnect.\n  - `reconnecting`. Fired upon an attempt to reconnect.\n    Parameters:\n      - `Number` reconnection attempt number\n  - `reconnect_error`. Fired upon a reconnection attempt error.\n    Parameters:\n      - `Object` error object\n  - `reconnect_failed`. Fired when couldn't reconnect within `reconnectionAttempts`\n\n## License\n\n[MIT](/LICENSE)\n","_attachments":{},"homepage":"https://github.com/Automattic/socket.io-client#readme","bugs":{"url":"https://github.com/Automattic/socket.io-client/issues"},"license":"MIT"}