On C / Linux, it is easy to set a different value for these socket options for each KEEPALIVE tcp connection independently .
TCP_KEEPCNT (since Linux 2.4) The maximum number of TCP test probes must be sent before deleting the connection. This parameter should not be used in code intended for carrying.
TCP_KEEPIDLE (since Linux 2.4) The connection time (in seconds) must remain inactive before TCP starts sending validation tests if the socket option SO_KEEPALIVE has been set in this juice. This parameter should not be used in code intended for carrying.
TCP_KEEPINTVL (since Linux 2.4) Time (in seconds) between individual probes. This parameter should not be used in code intended for carrying.
In netty or java, how to set three socket options for a socket? I know that there is no portable way to solve it, but only on Linux, can I set these socket options?
source
share