send_loop

Function send_loop 

Source
async fn send_loop<W>(
    writer: W,
    state: Arc<Mutex<TransportState>>,
    rx: Receiver<Message>,
    countdown: Countdown,
) -> Result<(), NetworkError>
where W: AsyncWrite + Unpin,
Expand description

Consume messages to be delivered to remote parties and send them.

The function automatically splits large messages into chunks that fit into a noise package.