Function iroh_gossip::net::util::write_message
source · pub async fn write_message<W: AsyncWrite + Unpin>(
writer: &mut W,
buffer: &mut BytesMut,
frame: &Message<PublicKey>,
max_message_size: usize
) -> Result<()>
Available on crate feature
net
only.Expand description
Write a ProtoMessage
as a length-prefixed, postcard-encoded message.