//! QUIC RPC framework for quicprochat v2.
//!
//! This crate implements a lightweight, binary-framed RPC protocol over QUIC.
//! Each RPC call opens a new QUIC bi-directional stream, sends a request frame,
//! and reads a response frame. Server-initiated push events use uni-streams.
//!
//! # Wire format
//!
//! All integers are big-endian.
//!
//! **Request** (client → server, bi-stream):
//! ```text
//! [method_id: u16][request_id: u32][payload_len: u32][protobuf bytes]
//! ```
//!
//! **Response** (server → client, same bi-stream):
//! ```text
//! [status: u8][request_id: u32][payload_len: u32][protobuf bytes]
//! ```
//!
//! **Push** (server → client, uni-stream):
//! ```text
//! [event_type: u16][payload_len: u32][protobuf bytes]
//! ```
//!
//! # Architecture
//!
//! - [`framing`] — frame types ([`framing::RequestFrame`], [`framing::ResponseFrame`],
//!   [`framing::PushFrame`]) and encode/decode logic.
//! - [`method`] — [`method::MethodRegistry`] maps `u16` method IDs to async handler
//!   functions with optional per-method timeouts.
//! - [`server`] — [`server::RpcServer`] binds a QUIC endpoint, performs an auth
//!   handshake on each connection, then dispatches RPC streams to registered handlers.
//! - [`client`] — [`client::RpcClient`] connects to the server with TLS, supports
//!   auto-reconnect with exponential backoff, and multiplexes concurrent RPCs.
//! - [`push`] — [`push::PushBroker`] manages per-identity push connections and
//!   fan-out to channel members.
//! - [`middleware`] — session validation, rate limiting, and structured audit logging.
//! - [`auth_handshake`] — initial session-token exchange on the first bi-stream.
//! - [`error`] — [`error::RpcError`] and [`error::RpcStatus`] types.

pub mod auth_handshake;
pub mod framing;
pub mod method;
pub mod server;
pub mod client;
pub mod middleware;
pub mod push;
pub mod error;
