pub fn new(mem: &GuestMemory) -> Result<Vsock> {
        Ok(Vsock {
            fd: OpenOptions::new()
                .read(true)
                .write(true)
                .custom_flags(libc::O_CLOEXEC | libc::O_NONBLOCK)
                .open(VHOST_PATH)
                .map_err(Error::VhostOpen)?,
            mem: mem.clone(),
        })
    }
/// Open a handle to a new VHOST-VSOCK instance.
Open a handle to a new VHOST-VSOCK instance.
Open a handle to a new VHOST - VSOCK instance .
pub fn new(mem: &GuestMemory) -> Result<Vsock> {
        Ok(Vsock {
            fd: OpenOptions::new()
                .read(true)
                .write(true)
                .custom_flags(libc::O_CLOEXEC | libc::O_NONBLOCK)
                .open(VHOST_PATH)
                .map_err(Error::VhostOpen)?,
            mem: mem.clone(),
        })
    }
pub fn new ( mem : & GuestMemory ) -> Result < Vsock > { Ok ( Vsock { fd : OpenOptions :: new ( ) . read ( true ) . write ( true ) . custom_flags ( libc :: O_CLOEXEC | libc :: O_NONBLOCK ) . open ( VHOST_PATH ) . map_err ( Error :: VhostOpen ) ? , mem : mem . clone ( ) , } ) }
Open a handle to a new VHOST-VSOCK instance.
Open a handle to a new VHOST - VSOCK instance .
mem
&GuestMemory
mem
&GuestMemory