Skip to main content

send_frame

Function send_frame 

Source
pub async fn send_frame<S: Sink>(
    sink: &mut S,
    bufs: impl Into<IoBufs> + Send,
    max_message_size: u32,
) -> Result<(), Error>
Expand description

Sends data to the sink with a varint length prefix.

The varint length prefix is prepended to the buffer(s), which results in a chunked IoBufs.

Returns an error if the message is too large or the sink is closed.