#[non_exhaustive]pub struct Config {
pub ice_candidates: Vec<SocketAddr>,
pub udp_bind: SocketAddr,
pub max_age: Option<Duration>,
pub bandwidth: Allocator,
}Expand description
Configuration shared by both server publish and server subscribe.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ice_candidates: Vec<SocketAddr>Public UDP socket addresses that should be advertised as ICE host
candidates. Each is sent as a separate candidate line in the SDP
answer so a remote peer can reach us.
If empty, the mux advertises the bound address, substituting loopback when the socket is bound to an unspecified address. That works for loopback testing but not behind NAT.
udp_bind: SocketAddrAddress the shared WebRTC media socket binds to. Every WHIP/WHEP session
shares this one UDP port (demuxed by ICE ufrag), so a deployment opens
exactly one media port in its firewall. 0.0.0.0:0 (the default) lets
the OS pick a port, which is fine for dev/loopback; production pins it.
max_age: Option<Duration>How long relays keep a non-latest group of an ingested media track fetchable.
A retention budget, not a delivery one: it never makes a subscriber play further
behind live, it caps how far back a FETCH can still reach. None keeps hang’s own
default, which suits a segmented egress (HLS/DASH) reading the broadcast downstream:
it may only advertise segments that are still fetchable. Lower it when nothing reads
history and the memory matters.
Ingest only (server publish / WHIP): WHEP egress reads a broadcast someone else
declared, so it ignores this.
bandwidth: AllocatorConnection allocator each ingested track claims its peak-hold bitrate on.
Ingest only (server publish / WHIP); WHEP egress ignores this.