Expand description
RedWire — RedDB’s binary TCP / TLS wire protocol with auth handshake, multiplex, compression, and version negotiation.
See docs/adr/0001-redwire-tcp-protocol.md. The protocol is
gated on a 0xFE startup magic byte so the listener can share
a port with HTTP and gRPC behind the service router.
Layered API:
frame— frame struct + MessageKind + flagscodec— encode/decode (16-byte header + payload)auth— handshake state machinesession— per-connection dispatch looplistener— TCP / TLS / Unix accept
Re-exports§
pub use listener::start_redwire_unix_listener;pub use listener::start_redwire_listener;pub use listener::start_redwire_listener_on;pub use listener::start_redwire_tls_listener;pub use listener::RedWireConfig;
Modules§
- auth
- Handshake state machine + auth method dispatch.
- codec
- Re-export of the canonical RedWire codec from
reddb-wire. - frame
- Re-export of the canonical RedWire frame types from
reddb-wire. - listener
- TCP / TLS / Unix listeners for the RedWire protocol.
- session
- Per-connection RedWire session: handshake → frame loop → bye.
Structs§
- Flags
- Frame
- Frame
Builder - Builder for server-emitted
Frames.
Enums§
- Build
Error - Errors surfaced at
build()time so they fail at construction rather than at encode time, where the call site has already lost the context to recover. - Frame
Error - Message
Kind - Single-byte message-kind discriminator. Numeric values are part of the wire spec — never repurpose a value once shipped.
Constants§
- DEFAULT_
REDWIRE_ PORT - Default port for the RedWire listener.
- FRAME_
HEADER_ SIZE - MAX_
FRAME_ SIZE - 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).