Skip to main content

send_frame

Function send_frame 

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

Sends data to the sink with a varint length prefix. Returns an error if the message is too large or the stream is closed.