I've been playing around with the basic chat client code from Head First
Java. I extended the initial example to be able to talk to more than 1 client at a time using threads. For those that aren't familiar with the book, the client connects to the server and the server simply sends it a
string containing "advice". Anyway, I set it up to loop so once you connect to the server, it sends you a continous stream of advice, about 1 every second. Multiple clients can connect and that works fine. My question is how do I determine when the client is no longer there? If I kill a client using ^C, the server
thread sending the data to that client just keeps on trucking. I've tried using the isConnected() method of the socket class to see if the connection is still good but the behavior is the same. I realize that a proper client would call close() but that's not the point. Surely there has to be a way I can tell that the client bailed from the server side. . .