pub fn new(domain: Domain, type_: Type, protocol: Option<Protocol>) -> io::Result<Socket> {
        let protocol = protocol.map(|p| p.0).unwrap_or(0);
        Ok(Socket {
            inner: sys::Socket::new(domain.0, type_.0, protocol)?,
        })
    }
/// Creates a new socket ready to be configured.
///
/// This function corresponds to `socket(2)` and simply creates a new
/// socket, no other configuration is done and further functions must be
/// invoked to configure this socket.
Creates a new socket ready to be configured.
This function corresponds to `socket(2)` and simply creates a new
socket, no other configuration is done and further functions must be
invoked to configure this socket.
Creates a new socket ready to be configured . This function corresponds to ` socket ( 2 ) ` and simply creates a new socket no other configuration is done and further functions must be invoked to configure this socket .
pub fn new(domain: Domain, type_: Type, protocol: Option<Protocol>) -> io::Result<Socket> {
        let protocol = protocol.map(|p| p.0).unwrap_or(0);
        Ok(Socket {
            inner: sys::Socket::new(domain.0, type_.0, protocol)?,
        })
    }
pub fn new ( domain : Domain , type_ : Type , protocol : Option < Protocol > ) -> io :: Result < Socket > { let protocol = protocol . map ( | p | p . 0 ) . unwrap_or ( 0 ) ; Ok ( Socket { inner : sys :: Socket :: new ( domain . 0 , type_ . 0 , protocol ) ? , } ) }
Creates a new socket ready to be configured.
Creates a new socket ready to be configured .
domain
Domain
type_
Type
protocol
Option<Protocol>
domain
Domain
type_
Type
protocol
Option<Protocol>