eio-reconnect
Reconnect code for engine.io-client
Last updated 7 years ago by camachgk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eio-reconnect 
SYNC missed versions from official npm registry.

engine.io client reconnect

NPM version

Reconnect wrapper for engine.io-client - inspired by https://github.com/cayasso/engine.io-reconnect

Install

npm install eio-reconnect

Use

client = require 'engine.io-client'
reconnect = require 'eio-reconnect'

# Add reconnect functionality to eio
eio = reconnect client 'ws://localhost:8080'

eio.on 'reconnect', (attempts) -> console.log 'Reconnected after %d attempts', attempts

eio.on 'reconnecting', (attempts) -> console.log 'Reconnect attempt %d', attempts

eio.on 'reconnect_timeout', (time) -> console.log 'Timeout after %dms', time

eio.on 'reconnect_error', (error) -> console.log 'Error while reconnecting', error

Testing

grunt test

Contributing

  1. Create your feature branch (git checkout -b my-new-feature)
  2. Commit your changes (git commit -am 'Added some feature')
  3. Push to the branch (git push origin my-new-feature)
  4. Create new Pull Requests

Current Tags

  • 0.8.0                                ...           latest (7 years ago)

2 Versions

  • 0.8.0                                ...           7 years ago
  • 0.7.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (13)

Copyright 2014 - 2016 © taobao.org |