Skip to main content

spawn_socket_reader

Function spawn_socket_reader 

Source
pub fn spawn_socket_reader(
    socket: Arc<UdpSocket>,
) -> Receiver<(Vec<u8>, SocketAddr)>
Expand description

Spawn a 1:1 reader pumping every datagram from socket into a channel, for the client paths (one socket per session, so no demux is needed). Mirrors the inbound side of crate::server::mux for a single session.