pub fn socket(
domain: AddressFamily,
type_: SocketType,
protocol: Protocol
) -> Result<OwnedFd>
Expand description
socket(domain, type_, protocol)
—Creates a socket.
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.