pub struct NackResponderBuilder { /* private fields */ }Expand description
Builder for the NackResponderInterceptor.
§Example
use rtci_interceptor::{Slot, Registry, NackResponderBuilder};
let chain = Registry::new()
.with(Slot::NackResponder, NackResponderBuilder::new()
.with_size(1024)
.build())
.build();Implementations§
Source§impl NackResponderBuilder
impl NackResponderBuilder
Sourcepub fn with_size(self, size: u16) -> Self
pub fn with_size(self, size: u16) -> Self
Set the size of the send buffer.
Size must be a power of 2 between 1 and 32768 (inclusive). Larger buffers can retransmit older packets but use more memory.
Sourcepub fn with_max_packet_age(self, max_packet_age: Option<Duration>) -> Self
pub fn with_max_packet_age(self, max_packet_age: Option<Duration>) -> Self
Set how long a sent packet is kept for retransmission: the rtx-time of RFC 4588
8.1, when one is signalled. A NACK for a packet sent longer ago is not answered.
Default: None, a packet is available for as long as the buffer holds it.
Sourcepub fn with_rate_limit(self, rate_limit: RetransmissionRateLimit) -> Self
pub fn with_rate_limit(self, rate_limit: RetransmissionRateLimit) -> Self
Set how retransmissions are held to the congestion controller’s target (RFC 4588
section 7). Default: RetransmissionRateLimit::WithinTarget, the RFC’s form;
RetransmissionRateLimit::UpToTarget is the limiter libwebrtc’s RtpSender has
when it is given one.
Sourcepub fn with_max_reserve_fraction(self, fraction: f64) -> Self
pub fn with_max_reserve_fraction(self, fraction: f64) -> Self
Set the most of the congestion controller’s target the retransmission reserve of
RetransmissionRateLimit::WithinTarget takes, from 0 (no reserve: the target is
never lowered) to 1. Default: MAX_RETRANSMISSION_RESERVE.
Sourcepub fn build(self) -> NackResponderInterceptor
pub fn build(self) -> NackResponderInterceptor
Build the interceptor.