pub(crate) fn route(
        &self,
        addr: SocketAddr,
        data: DispatchData,
        protocol: Protocol,
    ) -> Result<(), NetworkBridgeErr> {
        match protocol {
            Protocol::TCP => {
                let _ = self
                    .network_input_queue
                    .send(DispatchEvent::SendTCP(addr, data))?;
            }
            Protocol::UDP => {
                let _ = self
                    .network_input_queue
                    .send(DispatchEvent::SendUDP(addr, data))?;
            }
        }
        self.waker.wake()?;
        Ok(())
    }
/// Forwards `serialized` to the NetworkThread and makes sure that it will wake up.
Forwards `serialized` to the NetworkThread and makes sure that it will wake up.
Forwards ` serialized ` to the NetworkThread and makes sure that it will wake up .
pub(crate) fn route(
        &self,
        addr: SocketAddr,
        data: DispatchData,
        protocol: Protocol,
    ) -> Result<(), NetworkBridgeErr> {
        match protocol {
            Protocol::TCP => {
                let _ = self
                    .network_input_queue
                    .send(DispatchEvent::SendTCP(addr, data))?;
            }
            Protocol::UDP => {
                let _ = self
                    .network_input_queue
                    .send(DispatchEvent::SendUDP(addr, data))?;
            }
        }
        self.waker.wake()?;
        Ok(())
    }
pub ( crate ) fn route ( & self , addr : SocketAddr , data : DispatchData , protocol : Protocol , ) -> Result < ( ) , NetworkBridgeErr > { match protocol { Protocol :: TCP => { let _ = self . network_input_queue . send ( DispatchEvent :: SendTCP ( addr , data ) ) ? ; } Protocol :: UDP => { let _ = self . network_input_queue . send ( DispatchEvent :: SendUDP ( addr , data ) ) ? ; } } self . waker . wake ( ) ? ; Ok ( ( ) ) }
Forwards `serialized` to the NetworkThread and makes sure that it will wake up.
Forwards ` serialized ` to the NetworkThread and makes sure that it will wake up .
&self
addr
SocketAddr
data
DispatchData
protocol
Protocol
&self
addr
SocketAddr
data
DispatchData
protocol
Protocol