proof_engine/networking/mod.rs
1//! Networking module: HTTP client, WebSocket client, connection management.
2//!
3//! Provides async-compatible networking primitives for leaderboards,
4//! replay sharing, analytics, and live updates. Designed to work with
5//! Rust's standard library plus minimal dependencies — uses non-blocking
6//! TCP sockets under the hood with a simple state-machine event loop.
7//!
8//! ## Modules
9//! - `http` — HTTP/HTTPS request/response with retry, caching, rate limiting
10//! - `websocket` — WebSocket client with auto-reconnect and message queueing
11//! - `leaderboard` — Leaderboard protocol: submit, fetch, paginate
12//! - `analytics` — Opt-in telemetry: session, deaths, performance
13//!
14//! ## Design
15//! All network operations are non-blocking. `tick(dt)` drives the state
16//! machines each frame. Results are delivered through `Event` queues that
17//! the game polls each frame — no async runtime required.
18
19pub mod http;
20pub mod websocket;
21pub mod leaderboard;
22pub mod analytics;
23
24pub mod protocol;
25pub mod transport;
26pub mod sync;
27pub mod lobby;
28pub mod rpc;
29
30pub use http::{HttpClient, HttpRequest, HttpResponse, HttpEvent, Method};
31pub use websocket::{WsClient, WsMessage, WsEvent, WsState};
32pub use leaderboard::{LeaderboardClient, ScoreEntry, LeaderboardEvent};
33pub use analytics::{Analytics, AnalyticsEvent, SessionStats};