#[non_exhaustive]pub struct ServerConfig {
pub chunk_size: u32,
pub window_ack_size: u32,
pub peer_bandwidth: u32,
pub expected_stream_key: Option<String>,
}Expand description
Configuration for a ServerSession.
#[non_exhaustive]: fields may grow (e.g. a future app gate alongside
expected_stream_key). Construct via ServerConfig::default plus the
with_* builder methods rather than a struct literal.
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.chunk_size: u32Outbound chunk size advertised (and adopted) on connect (§5.4.1).
window_ack_size: u32Window Acknowledgement Size advertised on connect (§5.4.4); also
the initial threshold for this session’s own inbound Ack accounting
(§5.4.3), until a peer WindowAckSize/SetPeerBandwidth updates it.
peer_bandwidth: u32Set Peer Bandwidth value advertised on connect (§5.4.5).
expected_stream_key: Option<String>If set, publish’s stream key (publishing name) must match this
value exactly or the publish is rejected: onStatus
NetStream.Publish.BadName, and no Publish/Media events are
emitted for that connection.
Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub fn with_expected_stream_key(
self,
expected_stream_key: Option<String>,
) -> Self
pub fn with_expected_stream_key( self, expected_stream_key: Option<String>, ) -> Self
Set ServerConfig::expected_stream_key. #[non_exhaustive] forbids
struct-literal construction of this type from outside the crate, so
this (plus the other with_* builders below) is how a caller
customises a field starting from ServerConfig::default.
Sourcepub fn with_chunk_size(self, chunk_size: u32) -> Self
pub fn with_chunk_size(self, chunk_size: u32) -> Self
Sourcepub fn with_window_ack_size(self, window_ack_size: u32) -> Self
pub fn with_window_ack_size(self, window_ack_size: u32) -> Self
Sourcepub fn with_peer_bandwidth(self, peer_bandwidth: u32) -> Self
pub fn with_peer_bandwidth(self, peer_bandwidth: u32) -> Self
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§impl<'de> Deserialize<'de> for ServerConfig
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ServerConfig
serde only.