pub fn write_frame<W: Write + ?Sized>(io: &mut W, message: &[u8]) -> Result<()>Expand description
Writes message as one frame, its length first as four big-endian bytes, and flushes.
This is the framing drive_stream gives a Framing::Message handshake, for a method
that sends other messages over the same stream (a pairing exchange, an announcement).
§Errors
InvalidInput when message is longer than MAX_MESSAGE; otherwise the stream’s error.