Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-emitting as a fallback for socket emit failure #151

Open
ispha opened this issue Dec 30, 2017 · 0 comments
Open

Re-emitting as a fallback for socket emit failure #151

ispha opened this issue Dec 30, 2017 · 0 comments

Comments

@ispha
Copy link

ispha commented Dec 30, 2017

Hi ,
Am using Socket.IO-Client-Swift', '~> 12.1.0’ , and am emitting with ack and every thing works very well that I either receive the custom ACK by server when emit succeeds or receive the one string "No ACK" in cae of emitting failure for any reason like server disconnection or net loss ,,etc . everything is fine , now the issue appears when socket disconnects and I don't know why it does not keep connecting if and only if device is not connected to Xcode(which keeps device active) , so my question is for such a case can I check the ACK after its time out so that if receive NO ACK I can emit again or should try re-connect or what should do in such a case of socket un-expected disconnection ?

My configuration is :
socket = SocketIOClient(socketURL: URL(string: Constants.SOCKITURL)! , config: [.log(true),.connectParams([my parms]),.secure(true),.reconnects(true),.forceWebsockets(true)])

should I change config by adding reconnect attempts or timeout ?
This case is so sensitive to my App that user has to confirm a specific request then socket is down and the emit doesn't reach server ,,,,please guid in this , and I hope if its clear to get my issue .

Thanks so much in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant