Closed pramodbms closed 9 years ago
I guess you may want to check for the onConnect() event (when client gets connected) or onError() event for any error. Please be advised that your question is related to socket.io protocol, not netty-socketio specific, so you may want to double check in another forum.
Ok.
solved this issue by registering a handler for "connect_error" event.
Hi,
On the client side, is it possible to check if the connect() call was successful?
var iosocket = io.connect('http://localhost:8081');
I see that the iosocket has few attributes : connected, disconnected, readyState.
But the values of these variables seems to be the same even when the io.connect() failed. It always shows up as:
connected : false, disconnected:true. iosocket.io.readyState="opening" .
My use case is to check if the connect() was successful and if it failed, to handle the error gracefully on the client side.