When a SocketException is encountered (or an IOException when your using BufferedReader for the socket) at all, should the whole connection be considered bad?
I’m more or less wondering if there are any “non-fatal” exceptions that can occur when reading or writing to a socket, Exceptions that occur but the socket is still usable.
A compilation of the javadoc of the subclasses of SocketException shows that you can’t recover from such an exception and reuse the socket.
BindException
Signals that an error occurred while attempting to bind a socket to a local address and port. Typically, the port is in use, or the requested local address could not be assigned.
ConnectException
Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the connection was refused remotely (e.g., no process is listening on the remote address/port).
NoRouteToHostException
Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the remote host cannot be reached because of an intervening firewall, or if an intermediate router is down.
PortUnreachableException
Signals that an ICMP Port Unreachable message has been received on a connected datagram.
SocketException itself: Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
Therefore I would say yes, there is no way to continue, since TCP already tried to ensure to recover from tranmission problems.