Does not look like there is anything to set socket options.
Moreover, trying to import and use setsockopt from ws2_32 does not work either, Winsock just reports that provided handle is not a socket handle. I believe it happens because netConnectIpWindows implementation calls AFD functions directly, bypassing Winsock API.
As far as I understand Threaded code, you can remove “on Windows” from the title: all setSocketOption are non pub setSocketOptionAfd , setSocketOptionPosix and setSocketOption (for Kqueue)
I think in the future all such functions will be public
Indeed, I noticed those too while looking into the issue.
It is what I missed, thanks! Borrowing it brings a bit too much though, like for instance it needs std.Io.Threaded.Thread which is private (not to be confused with std.Thread). Instead as a quick and dirty check I made setSocketOptionAfdpub in my local Zig installation and it worked perfectly fine.
Should I create an issue in Zig repo to make setSocketOption part of Io public API?