dstar_gateway_core/session/server/mod.rs
1//! Server-side session machinery.
2//!
3//! All three protocols (`DExtra`, `DPlus`, `DCS`) are implemented at
4//! the `ServerSessionCore` level. The `dstar-gateway-server` shell
5//! dispatches all three through dedicated per-protocol
6//! `handle_inbound_*` methods on `ProtocolEndpoint<P>`.
7//!
8//! The server-side machinery mirrors the client-side split:
9//! [`ServerSessionCore`] is the protocol-erased state machine,
10//! [`ServerSession<P, S>`] is the typestate wrapper. The
11//! `dstar-gateway-server` shell spawns one [`ServerSessionCore`] per
12//! inbound peer and routes datagrams through
13//! [`ServerSessionCore::handle_input`].
14//!
15//! [`ForwardableFrame`] is a helper type describing an encoded voice
16//! frame ready for fan-out to N other connected clients — the
17//! fan-out engine uses it to avoid re-encoding the same bytes
18//! per destination.
19
20mod core;
21mod event;
22mod forwardable;
23mod session;
24mod state;
25
26pub use self::core::ServerSessionCore;
27pub use event::{ClientRejectedReason, ServerEvent};
28pub use forwardable::ForwardableFrame;
29pub use session::ServerSession;
30pub use state::{
31 Closed, Link1Received, Linked, ServerState, ServerStateKind, Streaming, Unknown, Unlinking,
32};