pub struct UdpSocketState { /* private fields */ }
Expand description
QUIC-friendly UDP socket for Windows
Unlike a standard Windows UDP socket, this allows ECN bits to be read and written.
Implementations§
Source§impl UdpSocketState
impl UdpSocketState
pub fn new(socket: UdpSockRef<'_>) -> Result<Self>
pub fn send( &self, socket: UdpSockRef<'_>, transmit: &Transmit<'_>, ) -> Result<()>
pub fn recv( &self, socket: UdpSockRef<'_>, bufs: &mut [IoSliceMut<'_>], meta: &mut [RecvMeta], ) -> Result<usize>
Sourcepub fn max_gso_segments(&self) -> usize
pub fn max_gso_segments(&self) -> usize
The maximum amount of segments which can be transmitted if a platform supports Generic Send Offload (GSO).
This is 1 if the platform doesn’t support GSO. Subject to change if errors are detected while using GSO.
Sourcepub fn gro_segments(&self) -> usize
pub fn gro_segments(&self) -> usize
The number of segments to read when GRO is enabled. Used as a factor to compute the receive buffer size.
Returns 1 if the platform doesn’t support GRO.
pub fn may_fragment(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for UdpSocketState
impl RefUnwindSafe for UdpSocketState
impl Send for UdpSocketState
impl Sync for UdpSocketState
impl Unpin for UdpSocketState
impl UnwindSafe for UdpSocketState
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