pub struct ServerConfig {
pub stream_bind_address: String,
pub stream_port: u16,
pub buffer_ms: u32,
pub codec: String,
pub sample_format: 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.
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).
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