Expand description
RedWire — RedDB’s binary TCP/TLS wire protocol.
ADR 0001 (docs/adr/0001-redwire-tcp-protocol.md) is the
normative spec. This module owns the transport-agnostic parts:
frame layout, message-kind discriminator, flags, and the
encode/decode codec. Server-side dispatch (auth handshake,
session loop, listener accept) stays in reddb and depends on
these types.
Re-exports§
pub use builder::BuildError;pub use builder::FrameBuilder;pub use codec::decode_frame;pub use codec::encode_frame;pub use codec::FrameError;pub use frame::Flags;pub use frame::Frame;pub use frame::MessageKind;pub use frame::FRAME_HEADER_SIZE;pub use frame::MAX_FRAME_SIZE;
Modules§
- builder
- Server-side frame construction discipline.
- codec
- Hand-rolled binary codec for v2 frames. No serde — the on-wire shape is fixed by ADR 0001, kept simple so a hex-dump is readable.
- frame
- RedWire frame layout — 16-byte header + payload, little-endian.
Constants§
- DEFAULT_
REDWIRE_ PORT - Default port for the RedWire listener.
- MAX_
KNOWN_ MINOR_ VERSION - Highest minor version the server supports. Wire-bumped as we
add features that change the handshake; data-plane additions
flow through
Hello.featuresinstead. - REDWIRE_
MAGIC - Discriminator byte every RedWire client sends as the very first byte off the wire. The service-router detector keys off this (and so does the standalone listener path).