java.net.SocketException: Connection reset by peer: socket write error
I created a ServerSocket server class which listens on a given port. The client that connects to serversocket server program at first connects fine. I however, when I terminate the connection and try to reconnect again, even after the socket had been closed and reopened again. I get the SocketException: Connection reset by peer: socket write error....
The serversocket only does is listen for passing packages of information that I send. Once I receive, the socket is close and reopened again for the read receiving task. This is done the same way by the client. The client sends information to the server, and closes the socket it uses once it performs the outputstream function.
But it seems that I cannot reconnect the part of the program once I close the connection to begin with.
Is there a way around this?
Re: java.net.SocketException: Connection reset by peer: socket write error
Moved from Advanced Java