The error get_last_socket_error() gives when a non-blocking call has nothing to do yet.
assert(socket_init());
s := socket(AF_INET, .SOCK_DGRAM, .UDP);
defer close_and_reset(*s);
assert(set_blocking(s, false));
buffer: [8] u8;
assert(bind(s, "127.0.0.1", 0) == 0);
assert(recv(s, buffer.data, buffer.count, cast(MSG) 0) == -1);
assert(get_last_socket_error() == SOCKET_WOULDBLOCK);Doesn't run in the browser (skipped on wasm).
SOCKET_WOULDBLOCK :: WSAEWOULDBLOCK