eio-reconnect

Reconnect code for engine.io-client

engine.io client reconnect

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

npm install eio-reconnect
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
 
io.on 'reconnecting'(attempts) -> console.log 'Reconnect attempt %d'attempts
 
io.on 'reconnect_timeout'(time) -> console.log 'Timeout after %dms'time
 
grunt test