Module webrtc_sctp::stack::queue [−][src]
Queues
Data received from an SCTP peer must be processed before being passed to the upper-layer to perform out-of-order data reordering and message reassembly. We provide specialized queues in this module for performing these tasks. An OrderedDataQueue processes ordered (U=0) DATA chunks and yields SCTP messages in the correct sequence. An UnorderedDataQueue processes unordered (U=1) DATA chunks and yields messages as soon as they are available. (Note that the UnorderedDataQueue must still perform some ordering operations to arrange fragments in the correct order, even if the yielded data is unordered at the message level.)
When support for interleaved data (IDATA) is added, we will add OrderedIDataQueue and UnorderedIDataQueue to allow ordering by the new Fragment Sequence Number (FSN) and Message Identifier (MID) fields.
Structs
OrderedDataQueue |
This is the OrderedDataQueue. Duplicates MUST be filtered out before chunks are fed to OrderedDataQueue. Chunks fed to OrderedDataQueue MUST all have a common stream id. (In other words, streams must be demultiplexed and each stream fed to its own OrderedDataQueue.) A HashMap+LinkedList implementation would perform only slightly better in the worst-case scenarios, but this BinaryHeap+LinkedList implementation performs better across most cases. |
OutgoingDataQueue |
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.) |
UnorderedDataQueue |
Enums
FragmentOrderError |