feat: Phase 2 — relay daemon and client library with integration pipelines
wzp-relay: - RelayPipeline: ingest → FEC decode → jitter buffer → FEC encode → send - SessionManager: tracks active calls, idle expiry - RelayConfig: TOML-based configuration - Binary: accepts QUIC connections, receives media packets wzp-client: - CallEncoder: mic PCM → Opus encode → FEC → MediaPackets - CallDecoder: MediaPackets → FEC decode → jitter → Opus decode → PCM - CLI binary: connects to relay, sends test silence frames 99 tests passing across all 7 crates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
35
crates/wzp-relay/src/config.rs
Normal file
35
crates/wzp-relay/src/config.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
//! Relay daemon configuration.
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::net::SocketAddr;
|
||||
|
||||
/// Configuration for the relay daemon.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct RelayConfig {
|
||||
/// Address to listen on for incoming connections (client-facing).
|
||||
pub listen_addr: SocketAddr,
|
||||
/// Address of the remote relay (for the lossy inter-relay link).
|
||||
/// If None, this relay is the destination-side relay.
|
||||
pub remote_relay: Option<SocketAddr>,
|
||||
/// Maximum concurrent sessions.
|
||||
pub max_sessions: usize,
|
||||
/// Jitter buffer target depth in packets.
|
||||
pub jitter_target_depth: usize,
|
||||
/// Jitter buffer maximum depth in packets.
|
||||
pub jitter_max_depth: usize,
|
||||
/// Logging level (trace, debug, info, warn, error).
|
||||
pub log_level: String,
|
||||
}
|
||||
|
||||
impl Default for RelayConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
listen_addr: "0.0.0.0:4433".parse().unwrap(),
|
||||
remote_relay: None,
|
||||
max_sessions: 100,
|
||||
jitter_target_depth: 50,
|
||||
jitter_max_depth: 250,
|
||||
log_level: "info".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user