pub struct ChannelBalanceConfig {
pub unreliable_weight: u32,
pub reliable_weight: u32,
pub burst_size: usize,
}
Expand description
Parameters for unreliable / reliable channel prioritization.
Fields§
§unreliable_weight: u32
Relative weight with which to send unreliable packets.
Minimum value: 1
Maximum value: 256
Default value: 1
Note: The product of weights may not exceed 256 (CHANNEL_WEIGHT_MAX).
reliable_weight: u32
Relative weight with which to send reliable packets.
Minimum value: 1
Maximum value: 256
Default value: 1
Note: The product of weights may not exceed 256 (CHANNEL_WEIGHT_MAX).
burst_size: usize
Defines the maximum amount of data sent by a channel after an idle period. If a channel has a weight of 2, it may send 2 times this value in a burst, and so on.
Minimum value: 1
Maximum value: 65535 * 255 (CHANNEL_BURST_SIZE_MAX)
Default value: 10_000
Note: This value determines the time horizon over which channels are prioritized. If this value is too low, all channels will send with an effectively equal weight. If this value is too high, an idle channel will dominate the stream once it resumes sending.
Trait Implementations§
Source§impl Clone for ChannelBalanceConfig
impl Clone for ChannelBalanceConfig
Source§fn clone(&self) -> ChannelBalanceConfig
fn clone(&self) -> ChannelBalanceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more