pub async fn read_string<R: AsyncReadExt + Unpin>(r: &mut R) -> Result<String>
Expand description
Read a string from the stream. Strings are prefixed with a u64 length, but the data is padded to the next 8-byte boundary, eg. a 1-byte string becomes 16 bytes on the wire: 8 for the length, 1 for the data, then 7 bytes of discarded 0x00s.