From a4b38381253c7eb9a3cbd3ca2b1e30ba9bc80fff Mon Sep 17 00:00:00 2001 From: Talon Date: Fri, 3 Jul 2026 15:52:46 +0100 Subject: [PATCH] Cleanup protocol/ comments --- core/src/protocol/envelope.h | 2 +- core/src/protocol/protocol.cpp | 4 ++-- core/src/protocol/protocol.h | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/protocol/envelope.h b/core/src/protocol/envelope.h index 6f0ef97..6469553 100644 --- a/core/src/protocol/envelope.h +++ b/core/src/protocol/envelope.h @@ -1,5 +1,5 @@ /* - * protocol/envelope.h — thin helpers around the generated protobuf types. + * protocol/envelope.h: thin helpers around the generated protobuf types. * * Hides the generated namespace from callers that only need to send/receive * envelopes without touching proto types directly. All callers that do need diff --git a/core/src/protocol/protocol.cpp b/core/src/protocol/protocol.cpp index e3012d5..4fac63b 100644 --- a/core/src/protocol/protocol.cpp +++ b/core/src/protocol/protocol.cpp @@ -4,7 +4,7 @@ namespace voicecat::protocol { -// --- FrameCodec::emit ------------------------------------------------------- +// FrameCodec::emit void FrameCodec::emit(const uint8_t* payload, size_t len, std::vector& out) { // Length header: big-endian u32. @@ -20,7 +20,7 @@ void FrameCodec::emit(const std::vector& payload, std::vector& emit(payload.data(), payload.size(), out); } -// --- FrameCodec::feed ------------------------------------------------------- +// FrameCodec::feed bool FrameCodec::feed(const uint8_t* data, size_t len, std::vector>& out_frames) { diff --git a/core/src/protocol/protocol.h b/core/src/protocol/protocol.h index 2018bb5..4614a2e 100644 --- a/core/src/protocol/protocol.h +++ b/core/src/protocol/protocol.h @@ -1,10 +1,10 @@ /* - * protocol/protocol.h — control-plane (de)serialization + routing. + * protocol/protocol.h: control-plane (de)serialization + routing. * - * Design: docs/protocol.md. Wire format is a length-prefixed protobuf `Envelope` + * Wire format is a length-prefixed protobuf `Envelope` * (core/proto/voicecat.proto). This layer parses frames into Envelopes, correlates - * request_id ↔ response, and dispatches to handlers. Media frames do NOT come through here - * (they use the fixed binary header in voice.md §2). + * request_id response, and dispatches to handlers. Media frames do NOT come through here + * (they use the fixed binary header * * FrameCodec below is used by both the client (net/transport.h) and the server * (conn_session.cpp). See protocol/envelope.h for the Envelope-level encode/decode that sits @@ -20,7 +20,7 @@ namespace voicecat::protocol { constexpr uint32_t kProtocolVersion = 1; -constexpr uint32_t kMaxFrameBytes = 16u * 1024 * 1024; // docs/protocol.md §1 guard +constexpr uint32_t kMaxFrameBytes = 16u * 1024 * 1024; constexpr size_t kLengthHeaderSize = 4; // big-endian u32 prefix // Reads/writes [u32 big-endian length][payload] frames from a byte stream.