pub struct UdpListenConfig { /* private fields */ }
Implementations§
Source§impl UdpListenConfig
impl UdpListenConfig
Sourcepub fn with_send_broadcasts(self) -> Self
pub fn with_send_broadcasts(self) -> Self
Enables the socket capabilities to send broadcast messages when the listening socket is
also used for sending with
Endpoint::from_listener
.
Sourcepub fn with_receive_broadcasts(self) -> Self
pub fn with_receive_broadcasts(self) -> Self
On Windows, when listening on a specific IP address, the sockets also receives
corresponding subnet broadcasts and global broadcasts (std::net::Ipv4Addr::BROADCAST
)
received on the interface matching the IP. When this option is set, message-io mimics this
behavior on Linux.
Sourcepub fn with_reuse_address(self) -> Self
pub fn with_reuse_address(self) -> Self
Set value for the SO_REUSEADDR
option on this socket. This indicates that futher calls to
bind
may allow reuse of local addresses.
Sourcepub fn with_reuse_port(self) -> Self
pub fn with_reuse_port(self) -> Self
Set value for the SO_REUSEPORT
option on this socket. This indicates that further calls
to bind
may allow reuse of local addresses. For IPv4 sockets this means that a socket may
bind even when there’s a socket already listening on this port. This option is always-on
on Windows and cannot be configured.
Trait Implementations§
Source§impl Clone for UdpListenConfig
impl Clone for UdpListenConfig
Source§fn clone(&self) -> UdpListenConfig
fn clone(&self) -> UdpListenConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more