pub struct ServerConfig {
pub stream_port: u16,
pub buffer_ms: u32,
pub codec: String,
pub sample_format: String,
pub mdns_service_type: String,
pub mdns_enabled: bool,
pub mdns_name: String,
pub auth: Option<Arc<dyn AuthValidator>>,
pub encryption_psk: Option<String>,
pub state_file: Option<PathBuf>,
pub send_audio_to_muted: bool,
}Expand description
Server configuration for the embeddable library.
Fields§
§stream_port: u16TCP port for binary protocol (client connections). Default: 1704.
buffer_ms: u32Audio buffer size in milliseconds. Default: 1000.
codec: StringDefault codec: “f32lz4”, “pcm”, “opus”, “ogg”. Default: “f32lz4”.
sample_format: StringDefault sample format. Default: 48000:16:2.
mdns_service_type: StringmDNS service type. Default: “_snapcast._tcp.local.”.
mdns_enabled: boolEnable mDNS advertisement. Default: true (when mdns feature is compiled in).
mdns_name: StringmDNS service name. Default: “Snapserver”.
auth: Option<Arc<dyn AuthValidator>>Auth validator for streaming clients. None = no auth required.
encryption_psk: Option<String>Pre-shared key for f32lz4 encryption. None = no encryption.
state_file: Option<PathBuf>Path to persist server state (clients, groups). None = no persistence.
send_audio_to_muted: boolSend audio data to muted clients. Default: false (skip muted, saves bandwidth).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServerConfig
impl !RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl !UnwindSafe for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more