30 lines
1.2 KiB
Rust
30 lines
1.2 KiB
Rust
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
//! QUIC transport, connection lifecycle, and wire framing for the Synvael client-server protocol.
|
|
//!
|
|
//! This crate owns the asynchronous runtime and the transport dependencies, keeping them out of the lean `shared` protocol crate. Protocol message types live in `shared`; this crate is responsible only for carrying them over the wire.
|
|
//!
|
|
//! The synchronous simulation loop (`server`) and windowing loop (`client`) never touch the async runtime directly. They exchange messages with the network over channels, so the async runtime stays confined to this crate.
|
|
|
|
pub mod chunk;
|
|
pub mod codec;
|
|
pub mod endpoint;
|
|
pub mod error;
|
|
pub mod handshake;
|
|
pub mod runtime;
|
|
pub mod stats;
|
|
|
|
pub use chunk::{ChunkSink, ChunkSubscriber};
|
|
pub use runtime::{
|
|
ChunkStream, ClientLink, ConnectOutcome, NetworkServer, ServerEvent, connect_in_background,
|
|
};
|
|
pub use stats::NetStats;
|
|
|
|
/// Default UDP port the server binds and the client connects to when none is configured.
|
|
// TODO: make the bind address and port configurable through server/client configuration.
|
|
pub const DEFAULT_PORT: u16 = 25565;
|
|
|
|
#[cfg(test)]
|
|
#[path = "tests/handshake.rs"]
|
|
mod handshake_tests;
|