pub struct PlainIo { /* private fields */ }Expand description
A portable fallback backend over a plain (connected) UDP socket.
Implementations§
Trait Implementations§
Source§impl DataPlaneIo for PlainIo
impl DataPlaneIo for PlainIo
Source§fn send_batch(&mut self, datagrams: &[&[u8]]) -> Result<usize>
fn send_batch(&mut self, datagrams: &[&[u8]]) -> Result<usize>
Send up to datagrams.len() datagrams in one sendmmsg(2) syscall.
Returns the number of datagrams accepted by the kernel (≤ input length).
Source§fn recv_batch(
&mut self,
bufs: &mut [[u8; 2048]],
lens: &mut [usize],
) -> Result<usize>
fn recv_batch( &mut self, bufs: &mut [[u8; 2048]], lens: &mut [usize], ) -> Result<usize>
Receive up to bufs.len() datagrams in one recvmmsg(2) syscall.
Writes per-datagram byte counts into lens and returns the number of
datagrams received (may be less than bufs.len()).
Auto Trait Implementations§
impl Freeze for PlainIo
impl RefUnwindSafe for PlainIo
impl Send for PlainIo
impl Sync for PlainIo
impl Unpin for PlainIo
impl UnsafeUnpin for PlainIo
impl UnwindSafe for PlainIo
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