Expand description
RedWire — RedDB’s binary TCP / TLS wire protocol with auth handshake, multiplex, compression, and version negotiation.
See .red/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::start_redwire_tls_listener_on;pub use listener::RedWireConfig;
Modules§
- auth
- Handshake state machine + auth method dispatch.
- input_
stream - RedWire input-stream dispatch (issue #764, PRD #759 S5).
- listener
- TCP / TLS / Unix listeners for the RedWire protocol.
- output_
stream - RedWire output-stream dispatch (issue #762, PRD #759 S3).
- queue_
wait - RedWire live queue-wait dispatch (issue #917, PRD #915).
- session
- Per-connection RedWire session: handshake → frame loop → bye.
Structs§
- Flags
- Frame
- Frame
Builder - Builder for RedWire
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).