I'm using the Java NIO API for socket communication (in blocking mode). I noticed that when the remote host closes the connection, my client doesn't notice it - the client can still send data and doesn't get an exception, as if the data has been sent successfully. Have a look at the code below, which does the following: Start a very ...