Function rustix::net::accept_with

source ·
pub fn accept_with<Fd: AsFd>(sockfd: Fd, flags: SocketFlags) -> Result<OwnedFd>
Expand description

accept4(fd, NULL, NULL, flags)—Accepts an incoming connection, with flags.

Use acceptfrom_with to retrieve the peer address.

Even though POSIX guarantees that this will use the lowest unused file descriptor, it is not safe in general to rely on this, as file descriptors may be unexpectedly allocated on other threads or in libraries.

accept_with is the same as accept but adds an additional flags operand.

References