pub async fn send_frame<S: Sink>(
sink: &mut S,
buf: &[u8],
max_message_size: usize,
) -> Result<(), Error>
Expand description
Sends data to the sink with a 4-byte length prefix. Returns an error if the message is too large or the stream is closed.