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.
When using Socket.io all i could found is timeout for .connect() as:
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.