I have been trying to implement the TCP_KEEPALIVE parameter for a C server socket and I can't seem to figure out how to check if the socket is marked as broken. I followed this tutorial for configuring the socket to do the keep alive but it says that "If no ACK response is received for nine consecutive times, the connection is marked as broken". My question is, how do I know the socket is marked as broken?
Tutorial: http://tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/