[][src]Struct vsock::VsockStream

pub struct VsockStream { /* fields omitted */ }

A virtio stream between a local and a remote socket.

Methods

impl VsockStream[src]

pub fn connect(addr: &SockAddr) -> Result<Self>[src]

Open a connection to a remote host.

pub fn peer_addr(&self) -> Result<SockAddr>[src]

Virtio socket address of the remote peer associated with this connection.

pub fn local_addr(&self) -> Result<SockAddr>[src]

Virtio socket address of the local address associated with this connection.

pub fn shutdown(&self, how: Shutdown) -> Result<()>[src]

Shutdown the read, write, or both halves of this connection.

pub fn try_clone(&self) -> Result<Self>[src]

Create a new independently owned handle to the underlying socket.

pub fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>[src]

Set the timeout on read operations.

pub fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>[src]

Set the timeout on write operations.

pub fn take_error(&self) -> Result<Option<Error>>[src]

Retrieve the latest error associated with the underlying socket.

pub fn set_nonblocking(&self, nonblocking: bool) -> Result<()>[src]

Move this stream in and out of nonblocking mode.

Trait Implementations

impl Clone for VsockStream[src]

impl Debug for VsockStream[src]

impl Read for VsockStream[src]

impl Write for VsockStream[src]

impl AsRawFd for VsockStream[src]

impl FromRawFd for VsockStream[src]

impl IntoRawFd for VsockStream[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]