pub struct TokioUdpSocket { /* private fields */ }Implementations§
Trait Implementations§
Source§impl AbstractUdpSocket for TokioUdpSocket
impl AbstractUdpSocket for TokioUdpSocket
Source§fn create_io_poller(self: Arc<Self>) -> Pin<Box<dyn UdpPoller>>
fn create_io_poller(self: Arc<Self>) -> Pin<Box<dyn UdpPoller>>
Required methods
Creates a UDP socket I/O poller.
Source§fn try_send(&self, transmit: &Transmit<'_>) -> Result<()>
fn try_send(&self, transmit: &Transmit<'_>) -> Result<()>
Tries to send a UDP datagram to the specified destination.
Source§fn poll_recv(
&self,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>],
meta: &mut [RecvMeta],
) -> Poll<Result<usize>>
fn poll_recv( &self, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], meta: &mut [RecvMeta], ) -> Poll<Result<usize>>
Poll to receive a UDP datagram.
Source§fn local_addr(&self) -> Result<SocketAddr>
fn local_addr(&self) -> Result<SocketAddr>
Returns the local socket address.
Source§fn may_fragment(&self) -> bool
fn may_fragment(&self) -> bool
Returns whether the socket may fragment packets.
Source§fn max_transmit_segments(&self) -> usize
fn max_transmit_segments(&self) -> usize
Maximum number of segments that can be transmitted in one call.
Source§fn max_receive_segments(&self) -> usize
fn max_receive_segments(&self) -> usize
Maximum number of segments that can be received in one call.
Source§fn recv(
&self,
bufs: &mut [IoSliceMut<'_>],
meta: &mut [RecvMeta],
) -> impl Future<Output = IoResult<usize>> + Send
fn recv( &self, bufs: &mut [IoSliceMut<'_>], meta: &mut [RecvMeta], ) -> impl Future<Output = IoResult<usize>> + Send
Supplied methods
Receive a UDP datagram.
meta is the returned metadata for each buffer in bufs.Auto Trait Implementations§
impl !Freeze for TokioUdpSocket
impl RefUnwindSafe for TokioUdpSocket
impl Send for TokioUdpSocket
impl Sync for TokioUdpSocket
impl Unpin for TokioUdpSocket
impl UnwindSafe for TokioUdpSocket
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