If my client\'s connection is broken on the other end( kill -9 server). It takes several minutes for the client to determine that something is wrong. Sock
end( kill -9 server)
Sock
Spawn another thread that is constantly pinging the server - really the best you can do since a socket is not an active connection.