pub fn accept(&self) -> Result<(VsockStream, SockAddr)> {
        let mut vsock_addr = sockaddr_vm {
            svm_family: AF_VSOCK as sa_family_t,
            svm_reserved1: 0,
            svm_port: 0,
            svm_cid: 0,
            svm_zero: [0u8; 4],
        };
        let mut vsock_addr_len = size_of::<sockaddr_vm>() as socklen_t;
        let socket = unsafe {
            accept4(
                self.socket,
                &mut vsock_addr as *mut _ as *mut sockaddr,
                &mut vsock_addr_len,
                SOCK_CLOEXEC,
            )
        };
        if socket < 0 {
            Err(Error::last_os_error())
        } else {
            Ok((
                unsafe { VsockStream::from_raw_fd(socket as RawFd) },
                SockAddr::Vsock(VsockAddr::new(vsock_addr.svm_cid, vsock_addr.svm_port)),
            ))
        }
    }
/// Accept a new incoming connection from this listener.
Accept a new incoming connection from this listener.
Accept a new incoming connection from this listener .
pub fn accept(&self) -> Result<(VsockStream, SockAddr)> {
        let mut vsock_addr = sockaddr_vm {
            svm_family: AF_VSOCK as sa_family_t,
            svm_reserved1: 0,
            svm_port: 0,
            svm_cid: 0,
            svm_zero: [0u8; 4],
        };
        let mut vsock_addr_len = size_of::<sockaddr_vm>() as socklen_t;
        let socket = unsafe {
            accept4(
                self.socket,
                &mut vsock_addr as *mut _ as *mut sockaddr,
                &mut vsock_addr_len,
                SOCK_CLOEXEC,
            )
        };
        if socket < 0 {
            Err(Error::last_os_error())
        } else {
            Ok((
                unsafe { VsockStream::from_raw_fd(socket as RawFd) },
                SockAddr::Vsock(VsockAddr::new(vsock_addr.svm_cid, vsock_addr.svm_port)),
            ))
        }
    }
pub fn accept ( & self ) -> Result < ( VsockStream , SockAddr ) > { let mut vsock_addr = sockaddr_vm { svm_family : AF_VSOCK as sa_family_t , svm_reserved1 : 0 , svm_port : 0 , svm_cid : 0 , svm_zero : [ 0u8 ; 4 ] , } ; let mut vsock_addr_len = size_of :: < sockaddr_vm > ( ) as socklen_t ; let socket = unsafe { accept4 ( self . socket , & mut vsock_addr as * mut _ as * mut sockaddr , & mut vsock_addr_len , SOCK_CLOEXEC , ) } ; if socket < 0 { Err ( Error :: last_os_error ( ) ) } else { Ok ( ( unsafe { VsockStream :: from_raw_fd ( socket as RawFd ) } , SockAddr :: Vsock ( VsockAddr :: new ( vsock_addr . svm_cid , vsock_addr . svm_port ) ) , ) ) } }
Accept a new incoming connection from this listener.
Accept a new incoming connection from this listener .
&self
&self