Add support for TCP_CONNECTIONTIMEOUT on MacOS
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 870
- Forks
- 305
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the existing set_tcp_user_timeout and tcp_user_timeout methods with the macOS tcp.h definition at line 221 for TCP_CONNECTIONTIMEOUT. Check whether the option matches the Linux behavior, then determine the appropriate macOS-gated API and validate it with the project's relevant socket tests. Done means the option is exposed only on macOS with behavior documented by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100