synvael/crates/shared/src/protocol.rs

15 lines
792 B
Rust

// SPDX-License-Identifier: AGPL-3.0-only
//! Network protocol types and constants.
//!
//! The module is split by stream purpose: [`control`]-stream handshake and disconnect messages, and the [`chunk`]-sync request/delivery messages, and the periodic [`authority`]-stream state. Control-stream types are re-exported here so callers continue to refer to `shared::protocol::<Type>` regardless of the internal layout, while the chunk types stay namespaced under `shared::protocol::chunk` to keep the two protocols visually distinct.
pub mod authority;
pub mod chunk;
mod control;
pub use control::{
ClientHello, ControlMessage, Disconnect, FeatureFlags, HandshakeAck, HandshakeReject,
PROTOCOL_VERSION, PackRef, PackTier, PlayerIdentity, RejectReason, RequiredPack, StreamLayout,
};