std.net.StreamServer.accept cannot handle SO_(SND|RCV)TIMEO sockopts #7142
Labels
standard library
This issue involves writing Zig code for the standard library.
Milestone
i'm running into this line in my code: https://github.com/ziglang/zig/blob/master/lib/std/net.zig#L1701 - accept() getting a WouldBlock error, since i did not set
std.io.is_async
, but what i did was to do asetsockopt
forSO_(SND|RCV)TIMEO
which sets a timeout on the socket...i don't really want to set the socket to nonblocking. i just want to regularly return if there is no incoming connection, but i'm ok to have a few seconds timeouts on that...
i lifted the code from 0.6.0 into my own sources and modified it to look like this:
The text was updated successfully, but these errors were encountered: