pub async fn write_length_delimited<S: AsyncWrite + Unpin>( stream: &mut S, message: &[u8], ) -> Result<()>
A helper function to write a length-delimited message to a stream.