Milestone 1

This commit is contained in:
sam
2026-05-03 11:24:13 +02:00
parent 7dbb940107
commit 43483c2145
16 changed files with 1576 additions and 20 deletions

View File

@@ -0,0 +1,20 @@
//! UDP High-speed Voice Packet structures.
//!
//! Defines the headers and payload structures for the low-latency voice data
//! sent over UDP.
use serde::{Deserialize, Serialize};
/// The header attached to every UDP voice frame.
///
/// We separate this from the payload to allow the server to rapidly route packets
/// using just the `session_token` without fully deserializing the heavy audio data.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VoicePacketHeader {
/// The unique session ID matching the client's TCP authentication token.
pub session_token: u32,
/// A strictly increasing sequence number to detect dropped or out-of-order packets.
pub sequence_num: u64,
/// The timestamp of the packet generation, used to align jitter buffers.
pub timestamp: u64,
}