pub fn socket<T>(
    domain: AddressFamily,
    ty: SockType,
    flags: SockFlag,
    protocol: T
) -> Result<i32, Errno> where
    T: Into<Option<SockProtocol>>, 
Expand description

Create an endpoint for communication

The protocol specifies a particular protocol to be used with the socket. Normally only a single protocol exists to support a particular socket type within a given protocol family, in which case protocol can be specified as None. However, it is possible that many protocols may exist, in which case a particular protocol must be specified in this manner.

Further reading