Skip to main content

write_message

Function write_message 

Source
pub async fn write_message<W: AsyncWrite + Unpin>(
    writer: &mut W,
    msg: &MinerMessage,
) -> Result<()>
Expand description

Write a length-prefixed JSON message to an async writer.

Wire format: 4-byte big-endian length prefix followed by JSON payload.