Module io
Available on crate feature
tokio only.Expand description
Low-level I/O helpers for the connection handshake.
Functionsยง
- read_
packet ๐ - Reads from
readintoreaderuntil one whole packet is framed, returning itsFrame. The packet remains 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.