I've met a problem that when I process my data on my program, that the server may getoff its socket of my client program, but i need to catch this exception and reconnect it to run my program. i did not use the serverSocket but all use the Socket to create an object. I need your help. the implement code in detail is welcome. thanks
How to reconnect a socket when catch a SocketException in java?
1.7k Views Asked by LillianXiong At
2
You can't. You have to create a new one if you're the client, and just hope the client will do that if you're the server.