title: Server detecting a client losing connection from the socket
body: <p>In Java, if I connect to a client to a server via a socket and the client has an exception which causes it to crash, is there any way the server can detect that the socket connection is lost.</p>
  
  <p>I assume one method would be have some sort of heartbeat polling the client, but is there a simpler/easier way?</p>