pub struct UdpListener { /* private fields */ }Expand description
One UDP listener: a single mio::net::UdpSocket plus its routing config.
Unlike a TCP listener there is no accept loop — a readable event is a batch
of datagrams the session drains to WouldBlock.
Implementations§
Source§impl UdpListener
impl UdpListener
Sourcepub fn activate(
&mut self,
registry: &Registry,
udp_socket: Option<UdpSocket>,
) -> Result<Token, ProxyError>
pub fn activate( &mut self, registry: &Registry, udp_socket: Option<UdpSocket>, ) -> Result<Token, ProxyError>
Bind (or adopt an SCM-passed) socket and register it READABLE. The
READABLE registration is what drives Server::ready for this listener —
there is no accept path.
Sourcepub fn update_config(&mut self, patch: &UpdateUdpListenerConfig)
pub fn update_config(&mut self, patch: &UpdateUdpListenerConfig)
Apply a partial-update patch to this UDP listener’s live config. Fields
absent in the patch (None) are preserved.
Trait Implementations§
Source§impl ListenerHandler for UdpListener
impl ListenerHandler for UdpListener
fn get_addr(&self) -> &SocketAddr
fn protocol(&self) -> Protocol
fn public_address(&self) -> SocketAddr
Auto Trait Implementations§
impl !Freeze for UdpListener
impl RefUnwindSafe for UdpListener
impl Send for UdpListener
impl Sync for UdpListener
impl Unpin for UdpListener
impl UnsafeUnpin for UdpListener
impl UnwindSafe for UdpListener
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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