pub struct Gate { /* private fields */ }Expand description
A UDP socket that hands quinn only the datagrams the gate admits.
Everything except [AsyncUdpSocket::poll_recv] is passed straight through,
including the capability answers — max_receive_segments decides whether GRO
is used at all and may_fragment decides whether MTU discovery runs, so a
wrapper that answered them itself would quietly change the transport.
Implementations§
Trait Implementations§
Source§impl AsyncUdpSocket for Gate
impl AsyncUdpSocket for Gate
Source§fn create_io_poller(self: Arc<Self>) -> Pin<Box<dyn UdpPoller>>
fn create_io_poller(self: Arc<Self>) -> Pin<Box<dyn UdpPoller>>
Create a [
UdpPoller] that can register a single task for write-readiness notifications Read moreSource§fn try_send(&self, transmit: &Transmit<'_>) -> Result<()>
fn try_send(&self, transmit: &Transmit<'_>) -> Result<()>
Send UDP datagrams from
transmits, or return WouldBlock and clear the underlying
socket’s readiness, or return an I/O error Read moreSource§fn poll_recv(
&self,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>],
metas: &mut [RecvMeta],
) -> Poll<Result<usize>>
fn poll_recv( &self, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], metas: &mut [RecvMeta], ) -> Poll<Result<usize>>
Receive UDP datagrams, or register to be woken if receiving may succeed in the future
Source§fn local_addr(&self) -> Result<SocketAddr>
fn local_addr(&self) -> Result<SocketAddr>
Look up the local IP address and port used by this socket
Source§fn max_transmit_segments(&self) -> usize
fn max_transmit_segments(&self) -> usize
Maximum number of datagrams that a [
Transmit] may encodeSource§fn max_receive_segments(&self) -> usize
fn max_receive_segments(&self) -> usize
Maximum number of datagrams that might be described by a single [
RecvMeta]Source§fn may_fragment(&self) -> bool
fn may_fragment(&self) -> bool
Whether datagrams might get fragmented into multiple parts Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Gate
impl !UnwindSafe for Gate
impl Freeze for Gate
impl Send for Gate
impl Sync for Gate
impl Unpin for Gate
impl UnsafeUnpin for Gate
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