Struct cobalt::shared::Config [] [src]

pub struct Config {
    pub send_rate: u32,
    pub congestion_divider: u32,
    pub packet_max_size: usize,
    pub protocol_header: [u8; 4],
    pub packet_drop_threshold: u32,
    pub connection_init_threshold: u32,
    pub connection_drop_threshold: u32,
    pub congestion_rtt_threshold: u32,
    pub congestion_switch_wait: u32,
    pub congestion_switch_min_delay: u32,
    pub congestion_switch_max_delay: u32,
}

A connection configuration object.

Fields

send_rate: u32

Number of packets send per second. Default is 30.

congestion_divider: u32

Division factor used to reduce the number of packets send per second in case of network congestion. Default is 3.

packet_max_size: usize

Maximum bytes that can be received / send in one packet. Default 1400.

protocol_header: [u8; 4]

32-Bit Protocol ID used to identify UDP related packets. Default is [1, 2, 3, 4].

packet_drop_threshold: u32

Maximum RTT in milliseconds before a packet is considered lost. Default is 1000.

connection_init_threshold: u32

Maximum time in milliseconds until the first packet must be received before a connection attempt fails. Default is 100.

connection_drop_threshold: u32

Maximum time in milliseconds between any two packets before the connection gets dropped. Default is 1000.

congestion_rtt_threshold: u32

Maximum RTT in milliseconds before turning on congestion avoidance by throttling the amount of send seconds per second. Default is 250.

congestion_switch_wait: u32

Interval time in milliseconds between congestion avoidance checks. Default is 10000.

congestion_switch_min_delay: u32

Minimum milliseconds between turning on / off congestion avoidance. Default is 1000.

congestion_switch_max_delay: u32

Maximum milliseconds between turning on / off congestion avoidance. Default is 60000.

Methods

impl Config
[src]

fn new() -> Config

Trait Implementations

impl Clone for Config
[src]

fn clone(&self) -> Config

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Config
[src]