MegaBits / SIOSocket

Realtime iOS application framework (client) http://socket.io
MIT License
494 stars 80 forks source link

Ability to specify list of engine.io transports through the SIOSocket client. #38

Closed brandonramirez closed 9 years ago

brandonramirez commented 9 years ago

Resolves #35

brandonramirez commented 9 years ago

Any feedback on this change? I don't like maintaining my own fork, so I hope this can be included in the mainline repository and part of the next release.

gtomitsuka commented 9 years ago

+1. Helps a lot.

agconti commented 9 years ago

+1. We found this ourselves. Its necessary for sockets to properly connect to servers running more than one dyno.

glemmaPaul commented 9 years ago

+1. This also resolves a lot of problems with 2 dyno's on Heroku. I have to force the socket.io client to use websocket. Please merge this in.

andrew-frank commented 9 years ago

Amazing, thanks guys! To solve the problem of 2 dyno's on Heroku, I had to use only "websocket" transports. Also in socket.io.js.h there was one argument missing (NSArray *transports) and I couldn't compile because of it

static NSString *socket_io_js_constructor(NSString *hostURL, BOOL reconnection, NSInteger attemptLimit, NSTimeInterval reconnectionDelay, NSTimeInterval reconnectionDelayMax, NSTimeInterval timeout, NSArray *transports) { 
    ... 
}
glemmaPaul commented 9 years ago

Exactly, the transports need to be on websockets to not let it fail connecting. The cause of it can be because of the long polling functionality on the beginning. The router fails to keep it on one web dyno.

On Saturday, Feb 14, 2015 at 12:04 PM, frandrzej notifications@github.com, wrote:

Amazing, thanks guys! To solve the problem of 2 dyno's on Heroku, I had to use only "websocket" transports. Also in socket.io.js.h there was one argument missing (NSArray *transports) and I couldn't compile because of it

static NSString socket_io_js_constructor(NSString hostURL, BOOL reconnection, NSInteger attemptLimit, NSTimeInterval reconnectionDelay, NSTimeInterval reconnectionDelayMax, NSTimeInterval timeout, NSArray *transports) { ... }

— Reply to this email directly or view it on GitHub.