Skip to main content

NackResponderBuilder

Struct NackResponderBuilder 

Source
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

Source

pub fn new() -> Self

Create a new builder with default settings.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn build(self) -> NackResponderInterceptor

Build the interceptor.

Trait Implementations§

Source§

impl Default for NackResponderBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.