I am building a Distributed File system using TCP Sockets in C. I have to distribute a file and send it to four servers from the client code I have written. I was wondering if there is a systematic way to check if the connection to a specific server is still alive.
Some additional information: 1.) Both the server and client codes in C are written by me. 2.) I issued a connect() call for all the servers at the start of my client code (and it was successful). 3.) I don't wish to attempt to read or write data on that socket to check its status. I intend to handle that situation where a server is suddenly shut down.