retransmitPacket method

void retransmitPacket(
  1. int sequence
)

Retransmits a specific packet identified by its (current) sequence number. Used by fast-retransmit; the sequence may already have been retired by an RTO-driven re-key, in which case there is nothing to do.

Implementation

void retransmitPacket(int sequence) {
  final packet = _sentPackets[sequence];
  if (packet == null) return;
  final newSeq = retransmit(packet);
  if (newSeq != null) {
    onRetransmit?.call(packet);
  }
}