Socket.IO-Client-Swift icon indicating copy to clipboard operation
Socket.IO-Client-Swift copied to clipboard

Network error handling in Socket.io Swift client (v 13.0.1)

Open kinza88 opened this issue 8 years ago • 1 comments

When using Socket.io all i could found is timeout for .connect() as:

socket.connect(timeoutAfter: 5) {
     print("Could not connect")
}

How can i implement timeout in emit? I got an example of emitWithAck but that wasn't clear enough. I want to ask that how can I get all the network errors in .connect or .emit? For example, when the server is down "could not connect to server" message gets printed in the log. But how can I handle it through callbacks? Any help would be appreciated.

kinza88 avatar Dec 26 '17 10:12 kinza88

@nuclearace I need you to have a look in this. Thankyou.

kinza88 avatar Dec 26 '17 10:12 kinza88