pub struct ServerConfig {Show 13 fields
pub stream_bind_address: String,
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 client_filter: Option<Arc<dyn ClientFilter>>,
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_bind_address: StringBind address for binary protocol client connections. Default: 0.0.0.0.
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.
client_filter: Option<Arc<dyn ClientFilter>>Client filter — called after Hello to accept/reject connections.
None = accept all clients.
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).