pub struct SenderBounds {
pub max_nak_seqs_per_packet: usize,
pub min_retransmit_interval: Duration,
pub pacing_burst_packets: usize,
}Expand description
The bounds an ARQ Sender holds a peer to, all chosen by the caller: the crate supplies none
of them.
Fields§
§max_nak_seqs_per_packet: usizeA NAK loss-list range is a compact wire encoding (Appendix A), but nothing stops a
malformed or adversarial range from declaring billions of entries. Sender::on_nak
never expands a range: it intersects it with the (small) send buffer. This is the further
cap on how many buffered packets one NAK datagram may mark for retransmission, bounding
the work a single (possibly spoofed) NAK can cause.
min_retransmit_interval: DurationShortest interval between two retransmissions of the same sequence number (#2819).
draft-sharabayko-srt-01 states none; without one a peer re-sending a NAK back to back
could keep every buffered packet in the driver’s outbound queue forever.
pacing_burst_packets: usizeMost DATA packets one crate::link::Link::flush sends, and the most pacing periods of
catch-up credit a late wake may claim, so a stall cannot be repaid as an unbounded burst.
Implementations§
Source§impl SenderBounds
impl SenderBounds
Sourcepub fn for_profile(profile: Profile) -> Self
pub fn for_profile(profile: Profile) -> Self
The Profile preset, replaceable through its with_* setters.
Sourcepub fn with_max_nak_seqs_per_packet(self, value: usize) -> Self
pub fn with_max_nak_seqs_per_packet(self, value: usize) -> Self
Replace Self::max_nak_seqs_per_packet.
Sourcepub fn with_min_retransmit_interval(self, value: Duration) -> Self
pub fn with_min_retransmit_interval(self, value: Duration) -> Self
Replace Self::min_retransmit_interval.
Sourcepub fn with_pacing_burst_packets(self, value: usize) -> Self
pub fn with_pacing_burst_packets(self, value: usize) -> Self
Replace Self::pacing_burst_packets.