#[non_exhaustive]pub enum StreamScheduler {
FirstComeFirstServed,
RoundRobin,
RoundRobinPerPacket,
Priority,
FairCapacity,
WeightedFairQueueing,
}Expand description
How an association picks the stream whose data it sends next: the stream schedulers of RFC 8260 section 3.
Without user message interleaving a message that is part sent is finished before another
stream is served, so a scheduler chooses between messages. With interleaving
(TransportConfig::with_message_interleaving, when the peer supports it too) it chooses
for every chunk, and a large message no longer holds the others up.
A stream’s priority is set with Stream::set_priority.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FirstComeFirstServed
Messages leave in the order they were written, whatever their stream (RFC 8260 section 3.1).
RoundRobin
The streams with something to send take turns: a message each, or a chunk each when interleaving (section 3.2).
RoundRobinPerPacket
Round robin that changes stream only when a new packet is started, so a packet carries the data of one stream and its loss holds up that stream alone (section 3.3).
Priority
The stream with the highest priority goes first, as long as it has something to send; streams of equal priority take turns (section 3.4).
FairCapacity
Each stream gets the same share of the bytes sent (section 3.5).
WeightedFairQueueing
Each stream gets a share of the bytes sent in proportion to its priority, taken as its weight (section 3.6, which RFC 8831 section 6.4 asks of WebRTC).