pub struct GccInterceptorBuilder<P> { /* private fields */ }Expand description
Builder for GccInterceptor.
Create with GccInterceptorBuilder::new, which returns (builder, handle).
Implementations§
Source§impl<P> GccInterceptorBuilder<P>
impl<P> GccInterceptorBuilder<P>
Sourcepub fn new() -> (Self, GccHandle)
pub fn new() -> (Self, GccHandle)
Create a new builder and the associated GccHandle.
The handle can be shared with the application so it can read the latest bitrate estimate each polling tick.
Sourcepub fn with_min_bitrate(self, bps: u32) -> Self
pub fn with_min_bitrate(self, bps: u32) -> Self
Minimum send rate floor (default 30 kbps).
Sourcepub fn with_max_bitrate(self, bps: u32) -> Self
pub fn with_max_bitrate(self, bps: u32) -> Self
Maximum send rate ceiling (default 2.5 Mbps).
Sourcepub fn with_received_rate_bound(
self,
received_rate_bound: ReceivedRateBound,
) -> Self
pub fn with_received_rate_bound( self, received_rate_bound: ReceivedRateBound, ) -> Self
What the bound of the estimate by the received rate does to an estimate above it
(Gcc::with_received_rate_bound): by default
it only stops the increase, so the estimate is kept while the application sends less
than it.
Sourcepub fn with_bandwidth_probing(self, bandwidth_probing: bool) -> Self
pub fn with_bandwidth_probing(self, bandwidth_probing: bool) -> Self
Whether the path is probed for capacity above the estimate (the default), as the peer
connection’s default interceptors do
(CongestionControlBuilder::with_bandwidth_probing): two clusters at the start, at
three and six times the 300 kbit/s the estimate starts at, and further ones while the
path carries what is asked, so an open path is found within a second instead of by
the 8% a second of draft-ietf-rmcat-gcc-02 section 5.5 (300 kbit/s to 2.5 Mbit/s: 28 s).
RFC 8836 section 2, requirement 4: the algorithm “SHOULD adapt as quickly as possible
to initial network conditions at the start of a flow”.
This chain has no pacer. A cluster is the NACK responder’s padding on the RTX stream,
sent as one burst and measured by how far apart the path delivers it
(burst_estimate); it needs a
NackResponderInterceptor in the chain and RTX
negotiated for the stream. Without them no cluster can be sent: the first one asked
for goes unanswered and no more are asked, and the estimate climbs as the draft has it.
Clusters are asked for at the start and while the application sends less than the
target allows; not after a large drop of the target, which a chain with the pacer
probes too (a burst of padding into the queue that caused the drop costs more than it
finds: ProbeController::set_unpaced).
A call that finds the path’s rate at the start meets a later capacity collapse from
that rate, and loses more at it than one that was still climbing (about twice the
retransmissions when 2.5 Mbit/s drop to 300 kbit/s; the changelog has the measured
figures). with_bandwidth_probing(false) is the start without probes.
Sourcepub fn build(self) -> impl FnOnce(P) -> GccInterceptor<P>
pub fn build(self) -> impl FnOnce(P) -> GccInterceptor<P>
Build the interceptor factory closure.