Method lrs::socket::Socket::new

Creates a new socket.

Syntax

impl Socket {
    fn new(domain: Domain, kind: Kind, protocol: i32, flags: SockFlags) -> Result<Socket, Errno>
}

Arguments

NameDescription
domain
kind
protocol
flags

Remarks

This is the most general constructor. There are simpler, more specialized constructors for the common cases of Unix, Ipv4, and Ipv6 sockets.

See also