pub struct AdvertiserOptions { /* private fields */ }Expand description
The Discovery Server an advertiser registers with.
Without explicit servers the SDK uses the Discovery Server from the NDI configuration. Creation fails when it names no server or one the SDK cannot use.
Implementations§
Source§impl AdvertiserOptions
impl AdvertiserOptions
Sourcepub fn clear_servers(self) -> Self
pub fn clear_servers(self) -> Self
Inherit Discovery Server endpoints from the NDI configuration.
Sourcepub fn clear_config(self) -> Self
pub fn clear_config(self) -> Self
Remove the per-instance Advanced configuration override.
Sourcepub fn configured_servers(&self) -> Option<&[String]>
pub fn configured_servers(&self) -> Option<&[String]>
Requested server endpoints, or None to inherit the NDI configuration.
Sourcepub fn configured_config(&self) -> Option<&AdvancedConfig>
pub fn configured_config(&self) -> Option<&AdvancedConfig>
The stored Advanced configuration handle, if any.
Sourcepub fn servers(
self,
servers: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn servers( self, servers: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Use a non-empty list of endpoints in place of the SDK configuration.
Use Self::clear_servers to inherit the configuration.
Each endpoint is a host name or IP address, optionally followed by a colon and a port (5959 when omitted). Several elements register with redundant servers. Creation refuses empty elements and elements containing a comma or NUL.
Sourcepub fn config(self, config: AdvancedConfig) -> Self
pub fn config(self, config: AdvancedConfig) -> Self
Create the advertiser with this per-instance Advanced SDK configuration, which it keeps for as long as it lives.
SendAdvertiser::new and RecvAdvertiser::new then need an
Advanced runtime, and a build with the Advanced SDK.