community: the drawer asks a peer for its card and the server for interests, and discover gets the similar-users shelf

This commit is contained in:
KeelrLeek committed 2026-09-02 14:03:26 -05:00
1 parent 64a7561750
commit 5160d97a5f
10 files changed
+412 -2

No files matched your search

+10
View File
@@ -160,6 +160,16 @@ impl Reader {
})
}
/// A length-prefixed raw byte string (a user picture, for one): the same
/// framing as `string`, without the UTF-8 interpretation.
pub fn bytes(&mut self) -> Result<Bytes> {
let len = self.u32()? as usize;
if self.buf.remaining() < len {
return Err(ProtoError::UnexpectedEof);
}
Ok(self.buf.copy_to_bytes(len))
}
/// Replace the remaining payload with its zlib-decompressed form.
pub fn decompress(&mut self) -> Result<()> {
let mut out = Vec::new();