pub fn write_framed(stream: &mut impl Write, data: &[u8]) -> Result<()>
Write a length-prefixed message to a synchronous stream