pub struct CcFeedbackRecorder { /* private fields */ }Expand description
Records packet arrivals per stream and builds feedback reports from them.
Implementations§
Source§impl CcFeedbackRecorder
impl CcFeedbackRecorder
Sourcepub fn add_packet(
&mut self,
arrival: Instant,
ssrc: u32,
sequence_number: u16,
ecn: Ecn,
)
pub fn add_packet( &mut self, arrival: Instant, ssrc: u32, sequence_number: u16, ecn: Ecn, )
Note that a packet of ssrc arrived at arrival.
Sourcepub fn build_report(
&mut self,
now: Instant,
sender_ssrc: u32,
report_timestamp: u32,
max_size: usize,
) -> CcFeedbackReport
pub fn build_report( &mut self, now: Instant, sender_ssrc: u32, report_timestamp: u32, max_size: usize, ) -> CcFeedbackReport
Build a report of everything observed since the last one.
max_size is the byte budget for the whole report, shared evenly between streams: a
report that does not fit the path’s MTU would be fragmented or dropped, and feedback that
does not arrive is worse than feedback that describes fewer packets.
report_timestamp is the middle 32 bits of an NTP timestamp. It is supplied rather than
read from a clock because a sans-I/O interceptor has none — shared::time::SystemInstant
is how the caller converts the monotonic now into wall-clock time.
Sourcepub fn remove_stream(&mut self, ssrc: u32)
pub fn remove_stream(&mut self, ssrc: u32)
Forget a stream entirely.
Trait Implementations§
Source§impl Debug for CcFeedbackRecorder
impl Debug for CcFeedbackRecorder
Source§impl Default for CcFeedbackRecorder
impl Default for CcFeedbackRecorder
Source§fn default() -> CcFeedbackRecorder
fn default() -> CcFeedbackRecorder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CcFeedbackRecorder
impl RefUnwindSafe for CcFeedbackRecorder
impl Send for CcFeedbackRecorder
impl Sync for CcFeedbackRecorder
impl Unpin for CcFeedbackRecorder
impl UnsafeUnpin for CcFeedbackRecorder
impl UnwindSafe for CcFeedbackRecorder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more