It is not possible to detect that the TCP connection is dead "ASAP". If the host, on the other hand, is dead, it is no longer involved in the TCP connection dialog box, and the only way to notice that it is a timeout in the connection.
You can reduce the latency on the socket to “notice” the problem earlier, but this is not a good solution in general.
, "ping" . , "".
, , , .
, , (, ), . ( ), .
, . " " struct, (, fd), .
( " " Linux . /TCP- .)