Summary
Complete the PTO (Probe Timeout) handling in QUIC loss detection as required by RFC 9002 Section 6.2.
Current State
The connection.cpp:1105 has a TODO comment indicating PTO timeout loss detection is not fully implemented:
// TODO: Handle PTO timeout for loss detection
The loss_detector class has the infrastructure but the integration in connection is incomplete.
RFC 9002 Requirements
Per Section 6.2 (Probe Timeout):
- When PTO expires, send one or two probe packets
- Probe packets must be ack-eliciting
- Increase PTO count on each expiry
- Reset PTO count when receiving acknowledgments
Implementation Details
Current loss_detector API
class loss_detector {
public:
[[nodiscard]] auto on_timeout() -> loss_detection_result;
[[nodiscard]] auto pto_count() const noexcept -> uint32_t;
auto reset_pto_count() noexcept -> void;
};
Required Changes in connection.cpp
void connection::on_timeout() {
auto result = loss_detector_.on_timeout();
if (result.event == loss_detection_event::pto_expired) {
// 1. Generate probe packets
generate_probe_packets();
// 2. Handle lost packets
for (const auto& lost : result.lost_packets) {
retransmit_frames(lost.frames);
}
// 3. Update congestion controller
for (const auto& lost : result.lost_packets) {
congestion_controller_.on_packet_lost(lost);
}
}
}
Tasks
Acceptance Criteria
Files to Modify
src/protocols/quic/connection.cpp
include/kcenon/network/protocols/quic/connection.h
tests/test_quic_connection.cpp
tests/test_quic_loss_detection.cpp
Related
Summary
Complete the PTO (Probe Timeout) handling in QUIC loss detection as required by RFC 9002 Section 6.2.
Current State
The
connection.cpp:1105has a TODO comment indicating PTO timeout loss detection is not fully implemented:// TODO: Handle PTO timeout for loss detectionThe
loss_detectorclass has the infrastructure but the integration inconnectionis incomplete.RFC 9002 Requirements
Per Section 6.2 (Probe Timeout):
Implementation Details
Current loss_detector API
Required Changes in connection.cpp
Tasks
generate_probe_packets()methodon_timeout()with loss detection result handlingAcceptance Criteria
Files to Modify
src/protocols/quic/connection.cppinclude/kcenon/network/protocols/quic/connection.htests/test_quic_connection.cpptests/test_quic_loss_detection.cppRelated