Struct webrtc_sctp::stack::recvtracker::RecvTracker [−][src]
pub struct RecvTracker { /* fields omitted */ }Track received TSNs and produce SACK chunks when needed. This struct currently uses a BTreeSet to track gap ack blocks (non-consecutive TSN ranges), which may be overkill for this application since the number of such blocks will likely be small in the common case. Realistically, we won't be able to report more than 368 gap blocks in a SACK given an MTU of 1500, although we may internally track a much larger number.
TODO: Try implementations with Vec instead of BTreeSet to measure performance in common cases. TODO: Consider limiting the number of gaps so a malicious peer can't exhaust our memory with a carefully constructed series of discontinuous TSNs. This may not be a problem, though, since the receive window should naturally bound the size.
TODO: a_rwnd calculation
Methods
impl RecvTracker[src]
impl RecvTrackerpub fn new(initial_tsn: TSN, initial_rwnd: u32) -> RecvTracker[src]
pub fn new(initial_tsn: TSN, initial_rwnd: u32) -> RecvTrackerpub fn buffer_tracker(&self) -> &BufferTracker[src]
pub fn buffer_tracker(&self) -> &BufferTrackerpub fn track(&mut self, data: &DataChunk) -> bool[src]
pub fn track(&mut self, data: &DataChunk) -> boolReturn false if this is a duplicate chunk.
pub fn seen(&self, tsn: TSN) -> bool[src]
pub fn seen(&self, tsn: TSN) -> boolpub fn is_complete(&self) -> bool[src]
pub fn is_complete(&self) -> boolpub fn rwnd(&self) -> u32[src]
pub fn rwnd(&self) -> u32pub fn sack(&mut self) -> SackChunk[src]
pub fn sack(&mut self) -> SackChunkTrait Implementations
impl Debug for RecvTracker[src]
impl Debug for RecvTrackerAuto Trait Implementations
impl !Send for RecvTracker
impl !Send for RecvTrackerimpl !Sync for RecvTracker
impl !Sync for RecvTracker