The set_tcp_user_timeout and tcp_user_timeout, which relate to the TCP_USER_TIMEOUT linux option, are enabled only under linux-related flags (Android or Fuchsia or Linux or target_os="cygwin").
However, it seems like MacOS has a similar option, just named differently, in tcp.h, line 221:
#define TCP_CONNECTIONTIMEOUT 0x20 /* connection timeout */
Should we maybe expose relevant methods for this option (behind macOS feature)? I assume it does the same with TCP_USER_TIMEOUT, but even if it doesn't it would be nice to have because it certainly does something related to connection timeout.