Function rustix::net::socket_with
source · [−]pub fn socket_with(
domain: AddressFamily,
type_: SocketType,
flags: SocketFlags,
protocol: Protocol
) -> Result<OwnedFd>
Expand description
socket_with(domain, type_ | flags, protocol)
—Creates a socket, with
flags.
POSIX guarantees that socket
will use the lowest unused file descriptor,
however it is not safe in general to rely on this, as file descriptors
may be unexpectedly allocated on other threads or in libraries.
socket_with
is the same as socket
but adds an additional flags
operand.