Question

I get socketexception that tell "connection reset" in the server side. this happen when Client side lost the connection to the server and re- connect.

what may I do to "fix" the socket. how to handle this Exception after it occur ... EDIT my question not need code, I ask about the concept of dealing with socketexception, the socket already closed or connection reset. my application supposed to be connected to the server all the time, we know that in any time of the app life the Registered client will lost the Internet access. then this exception will fire. How may I let the Client to reconnect!!

Was it helpful?

Solution

The idea is to fix the bug that causes it to happen. After it happens there is nothing you can do except close the socket. It's usually caused by writing to a connection that had already been closed b the peer: in other words, an application protocol error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top