pub struct TokioUdpSocket(/* private fields */);Expand description
Tokio-backed async UDP socket for use with QUIC transports.
Trait Implementations§
Source§impl AsFd for TokioUdpSocket
Available on Unix only.
impl AsFd for TokioUdpSocket
Available on Unix only.
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Source§impl Debug for TokioUdpSocket
impl Debug for TokioUdpSocket
Source§impl UdpTransport for TokioUdpSocket
impl UdpTransport for TokioUdpSocket
Source§fn from_std(socket: UdpSocket) -> Result<Self>
fn from_std(socket: UdpSocket) -> Result<Self>
Wrap a bound, non-blocking std UDP socket into this async type.
Source§fn local_addr(&self) -> Result<SocketAddr>
fn local_addr(&self) -> Result<SocketAddr>
The local address this socket is bound to.
Source§fn poll_recv_io<R>(
&self,
cx: &mut Context<'_>,
recv: impl FnMut(&Self) -> Result<R>,
) -> Poll<Result<R>>
fn poll_recv_io<R>( &self, cx: &mut Context<'_>, recv: impl FnMut(&Self) -> Result<R>, ) -> Poll<Result<R>>
Poll for read readiness, then attempt a receive operation. Read more
Source§fn poll_writable(&self, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_writable(&self, cx: &mut Context<'_>) -> Poll<Result<()>>
Poll for write readiness without attempting any I/O. Read more
Source§fn try_send_io<R>(&self, send: impl FnOnce(&Self) -> Result<R>) -> Result<R>
fn try_send_io<R>(&self, send: impl FnOnce(&Self) -> Result<R>) -> Result<R>
Attempt a send operation, managing readiness state. Read more
Source§fn max_transmit_segments(&self) -> usize
fn max_transmit_segments(&self) -> usize
Maximum number of datagrams to send in a single syscall (GSO).
Source§fn max_receive_segments(&self) -> usize
fn max_receive_segments(&self) -> usize
Maximum number of datagrams to receive in a single syscall (GRO).
Source§fn may_fragment(&self) -> bool
fn may_fragment(&self) -> bool
Whether outbound datagrams may be fragmented by the network layer.
Auto Trait Implementations§
impl !Freeze for TokioUdpSocket
impl RefUnwindSafe for TokioUdpSocket
impl Send for TokioUdpSocket
impl Sync for TokioUdpSocket
impl Unpin for TokioUdpSocket
impl UnsafeUnpin 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