Function maelstrom_util::net::async_socket_writer

source ยท
pub async fn async_socket_writer<MessageT>(
    channel: UnboundedReceiver<MessageT>,
    socket: impl AsyncWrite + Unpin,
    log: impl FnMut(&MessageT)
) -> Result<()>
where MessageT: Serialize,
Expand description

Loop, reading messages from a channel and writing them to a socket. The log parameter is used to insert debug logging.