pub struct UdpOptions {
pub reuse_port: bool,
pub gro: bool,
pub pktinfo: bool,
pub ecn: bool,
pub dont_fragment: bool,
pub v6_only: Option<bool>,
pub recv_buffer: Option<usize>,
pub send_buffer: Option<usize>,
}Expand description
Options for Socket::udp_bind.
Fields§
§reuse_port: boolSO_REUSEPORT (Linux, BSD): one socket per loop on the same address.
gro: boolGeneric receive offload: the kernel may hand over several datagrams from one peer as
one buffer with a segment size (Linux UDP_GRO, Windows URO). Off by default.
pktinfo: boolReport the local destination address of each datagram (IP_PKTINFO/IPV6_RECVPKTINFO).
ecn: boolReport the ECN bits of each datagram (IP_RECVTOS/IPV6_RECVTCLASS, Windows IP_ECN).
dont_fragment: boolSet the don’t-fragment bit (path MTU probing, as QUIC requires).
v6_only: Option<bool>IPV6_V6ONLY for IPv6 addresses.
recv_buffer: Option<usize>SO_RCVBUF.
send_buffer: Option<usize>SO_SNDBUF.
Trait Implementations§
Source§impl Clone for UdpOptions
impl Clone for UdpOptions
Source§fn clone(&self) -> UdpOptions
fn clone(&self) -> UdpOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UdpOptions
impl Debug for UdpOptions
Source§impl Default for UdpOptions
impl Default for UdpOptions
Source§fn default() -> UdpOptions
fn default() -> UdpOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for UdpOptions
impl Freeze for UdpOptions
impl Move for UdpOptions
impl RefUnwindSafe for UdpOptions
impl Send for UdpOptions
impl Sync for UdpOptions
impl Unpin for UdpOptions
impl UnsafeUnpin for UdpOptions
impl UnwindSafe for UdpOptions
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