I am working on a project that server using C which need to send heartbeat to client to check its status(using tcp socket) and i am wondering how do server-side program detect whether the client has crashed.
to be exact, with tcp connection established, when server send a segment to client, it needs to get an ack reply, what if the client has crashed, retransmit this segment over and over agian ? How do i handle this situation and could any one give me an example ?
Thanks.