pub struct TcpBackend { /* private fields */ }Expand description
TCP-based vsock backend.
Maps vsock ports to TCP ports for host-side handling.
Implementations§
Trait Implementations§
Source§impl Debug for TcpBackend
impl Debug for TcpBackend
Source§impl VsockBackend for TcpBackend
impl VsockBackend for TcpBackend
Source§fn on_connect(&mut self, addr: VsockAddr) -> Result<()>
fn on_connect(&mut self, addr: VsockAddr) -> Result<()>
Called when guest requests a connection.
Source§fn on_send(&mut self, addr: VsockAddr, data: &[u8]) -> Result<usize>
fn on_send(&mut self, addr: VsockAddr, data: &[u8]) -> Result<usize>
Called when guest sends data.
Source§fn on_recv(&mut self, addr: VsockAddr, buf: &mut [u8]) -> Result<usize>
fn on_recv(&mut self, addr: VsockAddr, buf: &mut [u8]) -> Result<usize>
Called when guest requests data.
Source§fn has_pending_data(&self, addr: VsockAddr) -> bool
fn has_pending_data(&self, addr: VsockAddr) -> bool
Checks if there’s pending data for a connection.
Auto Trait Implementations§
impl !Freeze for TcpBackend
impl RefUnwindSafe for TcpBackend
impl Send for TcpBackend
impl Sync for TcpBackend
impl Unpin for TcpBackend
impl UnsafeUnpin for TcpBackend
impl UnwindSafe for TcpBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more