-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra socket options: SO_ACCEPTCONN, TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL #830
Extra socket options: SO_ACCEPTCONN, TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL #830
Conversation
Apple platforms declare the constant, but do not actually implement it.
ebf5682
to
687918b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks a lot for adding these!
@badeend We don't have illumos in CI, but I do occasionally test rustix on illumos, but with this PR, on illumos,
At a quick search, I found this illumos bug report which on the surface looks similar. It's not formally necessary for wasi-sockets to support illumos, but it is worth considering whether there's something we should do there. |
In case it's relevant, the illumos version is openindiana 2023.05. |
That bug report and the source code seem to suggest that the order in which the options are set matters. I haven't been able to decipher the illumos source, but the bug report mentions that I don't have an illumos install, so I can't test it easily but do these changes work for you?: badeend@771f027 If not, how about when set_tcp_keepintvl and set_tcp_keepcnt are swapped around?
Couple of options:
|
I did some experimenting, and it seems to be related to the integer value. A value of 60 works, but the test has 61 which fails. I think option 1 may be fine here. This seems sufficiently minor that we don't need to make any changes at this time. |
This is now released in rustix 0.38.14. |
Add getters and setters for:
SO_ACCEPTCONN
TCP_KEEPCNT
TCP_KEEPIDLE
TCP_KEEPINTVL
Also, add getter for
SO_REUSEADDR
. (Setter already exists)