detectLostPackets method
Runs loss detection over everything outstanding (RFC 9002 section 6.1) and returns what it declared lost, also handed to onPacketsLost. The socket calls it after each ACK that acknowledged something; the loss timer calls it when the time threshold elapses.
Implementation
List<UDXPacket> detectLostPackets() {
final lost = _detectLost(clock.now());
if (lost.isNotEmpty) onPacketsLost?.call(lost);
return lost;
}