Another possible option is TCP_RXT_CONNDROPTIME
from the same header:
#define TCP_RXT_CONNDROPTIME 0x80 /* time after which tcp retransmissions will be
* stopped and the connection will be dropped
*/
I've found this weird commit where there are three implementations provided for TCP_USER_TIMEOUT
:
- Linux:
TCP_USER_TIMEOUT
is set manually (seems like this code is quite outdated);
- Darwin:
TCP_RXT_CONNDROPTIME
is used;
- Win: no implementation provided.
This commit might be a clue, but I haven't tested it myself. I just hope that this information could be helpful to someone.
Check TCP_USER_TIMEOUT
and TCP_CONNECTIONTIMEOUT
descriptions in the Linux man and BSD man - they doesn't seem to be very similar.