Module io
Expand description
Low-level I/O helpers for the connection handshake.
Functionsยง
- read_
packet - Reads from
readintoreaderuntil one whole packet is framed, returning its fixed header and total on-wire length. The packet stays buffered inreader(decode it withPacketReader::decode, thenconsumeit); any bytes read past it remain buffered too, so the samereadercan be handed to the steady-state read loop without losing data. - write_
packet - Encodes
packetintobuf(clearing and reusing it), writes it towriter, then flushes.