Struct webrtc_sctp::stack::queue::OutgoingDataQueue [−][src]
pub struct OutgoingDataQueue { /* fields omitted */ }An outgoing data queue suitable for use as a send-buffer (data chunks enqueued to be transmitted) and a sent-buffer (data chunks that have been transmitted, but have not yet been acknowledged). This is currently implemented as a BTreeSet instead of a Vec to maintain ordering even when retransmissions requirements might otherwise cause re-queueing in an arbitrary order. (Receiving multiple SACKs from the peer with different gap ack blocks could lead to retransmissions in any conceivable order.)
This implementation should work, but it seems very inefficient. It should definitely be reassessed in the future to see if there is a more efficient strategy.
Methods
impl OutgoingDataQueue[src]
impl OutgoingDataQueuepub fn new() -> OutgoingDataQueue[src]
pub fn new() -> OutgoingDataQueueCreate a new OutgoingDataQueue
pub fn push(&mut self, chunk: DataChunk)[src]
pub fn push(&mut self, chunk: DataChunk)pub fn pop(&mut self) -> Option<DataChunk>[src]
pub fn pop(&mut self) -> Option<DataChunk>pub fn front(&self) -> Option<&DataChunk>[src]
pub fn front(&self) -> Option<&DataChunk>pub fn back(&self) -> Option<&DataChunk>[src]
pub fn back(&self) -> Option<&DataChunk>pub fn contains(&self, tsn: TSN) -> bool[src]
pub fn contains(&self, tsn: TSN) -> boolpub fn get(&self, tsn: TSN) -> Option<&DataChunk>[src]
pub fn get(&self, tsn: TSN) -> Option<&DataChunk>pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizepub fn bytes(&self) -> usize[src]
pub fn bytes(&self) -> usizeReturn the total number of bytes used by all the data chunk buffers contained in this queue.
pub fn expunge(&mut self, cumulative_tsn_ack: TSN)[src]
pub fn expunge(&mut self, cumulative_tsn_ack: TSN)When we receive a cumulative TSN acknowledgement, all chunks with this TSN and earlier should be dropped. This is true not only for the sent-buffer, but also for the send-buffer since some of its items may be retransmissions.
pub fn transfer(&mut self, other: &mut OutgoingDataQueue, tsn: TSN) -> usize[src]
pub fn transfer(&mut self, other: &mut OutgoingDataQueue, tsn: TSN) -> usizeTransfer data chunks from one queue to another, returning the number of payload bytes transferred.
pub fn transfer_all(&mut self, other: &mut OutgoingDataQueue) -> usize[src]
pub fn transfer_all(&mut self, other: &mut OutgoingDataQueue) -> usizeTransfer all data chunks from one queue to another, returning the total number of payload bytes transferred.
pub fn transfer_range(
&mut self,
other: &mut OutgoingDataQueue,
first: TSN,
last: TSN
) -> usize[src]
pub fn transfer_range(
&mut self,
other: &mut OutgoingDataQueue,
first: TSN,
last: TSN
) -> usizeTransfer a range of data chunks from one queue to another, returning the total number of payload bytes transferred.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolAuto Trait Implementations
impl !Send for OutgoingDataQueue
impl !Send for OutgoingDataQueueimpl !Sync for OutgoingDataQueue
impl !Sync for OutgoingDataQueue