pub fn pair(
        domain: Domain,
        type_: Type,
        protocol: Option<Protocol>,
    ) -> io::Result<(Socket, Socket)> {
        let mut fds = [0, 0];
        let protocol = protocol.map(|p| p.0).unwrap_or(0);
        syscall!(socketpair(domain.0, type_.0, protocol, fds.as_mut_ptr()))
            .map(|_| (Socket { inner: fds[0] }, Socket { inner: fds[1] }))
    }
/// Creates a pair of sockets which are connected to each other.
///
/// This function corresponds to `socketpair(2)`.
Creates a pair of sockets which are connected to each other.
This function corresponds to `socketpair(2)`.
Creates a pair of sockets which are connected to each other . This function corresponds to ` socketpair ( 2 ) ` .
pub fn pair(
        domain: Domain,
        type_: Type,
        protocol: Option<Protocol>,
    ) -> io::Result<(Socket, Socket)> {
        let mut fds = [0, 0];
        let protocol = protocol.map(|p| p.0).unwrap_or(0);
        syscall!(socketpair(domain.0, type_.0, protocol, fds.as_mut_ptr()))
            .map(|_| (Socket { inner: fds[0] }, Socket { inner: fds[1] }))
    }
pub fn pair ( domain : Domain , type_ : Type , protocol : Option < Protocol > , ) -> io :: Result < ( Socket , Socket ) > { let mut fds = [ 0 , 0 ] ; let protocol = protocol . map ( | p | p . 0 ) . unwrap_or ( 0 ) ; syscall ! ( socketpair ( domain 0 type_ 0 protocol fds as_mut_ptr ( ) ) ) . map ( | _ | ( Socket { inner : fds [ 0 ] } , Socket { inner : fds [ 1 ] } ) ) }
Creates a pair of sockets which are connected to each other.
Creates a pair of sockets which are connected to each other .
domain
Domain
type_
Type
protocol
Option<Protocol>
domain
Domain
type_
Type
protocol
Option<Protocol>