-1 with errno set.int accept4NonBlocking(int srv, void * addr, uint * alen) @trusted nothrow @nogcAccept a new client socket with SOCK_NONBLOCK | SOCK_CLOEXEC atomically.
On Linux and FreeBSD this is a single accept4(2) syscall, replacing the previous accept() + two fcntl() calls. On other POSIX platforms (notably macOS) accept4 is unavailable and the helper falls back to accept() — the caller is then responsible for setNonBlocking().
srv | Listening socket file descriptor. |
addr | Output buffer for the peer address (sockaddr_storage). |
alen | In/out length of the address buffer. |
-1 with errno set.