engine.io client reconnect
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' eioon 'reconnect' consolelog 'Reconnected after %d attempts'attempts eioon 'reconnecting' consolelog 'Reconnect attempt %d'attempts eioon 'reconnect_timeout' consolelog 'Timeout after %dms'time eioon 'reconnect_error' consolelog 'Error while reconnecting'error
Testing
grunt test
Contributing
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Requests