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
sunfishcode
left a comment
There was a problem hiding this comment.
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_ACCEPTCONNTCP_KEEPCNTTCP_KEEPIDLETCP_KEEPINTVLAlso, add getter for
SO_REUSEADDR. (Setter already exists)