title: Detecting a broken socket
body: <p>I'm working with TCP IP Socket. </p>
  
  <p>Is <a href="https://stackoverflow.com/questions/698964/checking-if-a-clientsocket-has-disconnected-in-java-hangs">THIS</a> the simplest way to detect that a client socket connection is broken?</p>
  
  <p>I would be surprised if there is no Java API that detects a dead client and throws an exception. This should be possible at least when the server tries to send a packet to the client from the lack of an ACK response.</p>