async fn response_loop<T, U>(
    conn_id: usize,
    mut transport: TransportWriteHalf<T, U>,
    mut rx: mpsc::Receiver<Response>,
) where
    T: AsyncWrite + Send + Unpin + 'static,
    U: Codec,
{
    while let Some(res) = rx.recv().await {
        debug!(
            "<Conn @ {}> Sending response of type{} {}",
            conn_id,
            if res.payload.len() > 1 { "s" } else { "" },
            res.to_payload_type_string()
        );

        if let Err(x) = transport.send(res).await {
            error!("<Conn @ {}> {}", conn_id, x);
            break;
        }
    }

    trace!("<Conn @ {}> Output to connection closed", conn_id);
}
/// Repeatedly sends responses out over the wire
Repeatedly sends responses out over the wire
Repeatedly sends responses out over the wire
async fn response_loop<T, U>(
    conn_id: usize,
    mut transport: TransportWriteHalf<T, U>,
    mut rx: mpsc::Receiver<Response>,
) where
    T: AsyncWrite + Send + Unpin + 'static,
    U: Codec,
{
    while let Some(res) = rx.recv().await {
        debug!(
            "<Conn @ {}> Sending response of type{} {}",
            conn_id,
            if res.payload.len() > 1 { "s" } else { "" },
            res.to_payload_type_string()
        );
        if let Err(x) = transport.send(res).await {
            error!("<Conn @ {}> {}", conn_id, x);
            break;
        }
    }
    trace!("<Conn @ {}> Output to connection closed", conn_id);
}
async fn response_loop < T , U > ( conn_id : usize , mut transport : TransportWriteHalf < T , U > , mut rx : mpsc :: Receiver < Response > , ) where T : AsyncWrite + Send + Unpin + ' static , U : Codec , { while let Some ( res ) = rx . recv ( ) . await { debug ! ( " " conn_id if res payload len ( ) 1 { " " } else { " " } res to_payload_type_string ( ) ) ; if let Err ( x ) = transport . send ( res ) . await { error ! ( " " conn_id x ) ; break ; } } trace ! ( " " conn_id ) ; }
Repeatedly sends responses out over the wire
Repeatedly sends responses out over the wire
conn_id
usize
transport
TransportWriteHalf<T, U>
rx
mpsc::Receiver<Response>