Gottox / socket.io-java-client

Socket.IO Client Implementation in Java
MIT License
950 stars 387 forks source link

onDisconnect() #67

Open biechereran opened 11 years ago

biechereran commented 11 years ago

Hi, I have a question about when the socketio is raising disconnect() or how to listen to this. for example, i'm implement the abstrack class

new IOCallBack(){ . . . @Override pubic onDisconnect(){ System.out.println("connection terminated"); } . . . }

All the connection and the messages and everything is great the problem is when the server disconnect for some reason (Internet lost, Server Down and etc) this part not called... (Disconnect called only if the server force disconnect)

there is one way I can run this part, only when I hard coded call to mSocket.disconnet().

Can you help me about this issue? Why does the disconnect not called when the internet is down and when actually the connection to the server lost.,..

Thanks.