Move local_delayed_ack_time from QuicSentPacketManager to QuicReceivedPacketManager, set the delayed ack time to 1ms for Initial and Handshake packet number spaces when using v99, and use peer_delayed_ack_time instead of local_delayed_ack_time when with the MAD1 connection option.
gfe-relnote: n/a (Refactor or v99 only)
PiperOrigin-RevId: 261378188
Change-Id: I4bfed0bde6fa58506250b766294221f1aaf9fc29
diff --git a/quic/core/quic_received_packet_manager.h b/quic/core/quic_received_packet_manager.h
index aaae7f1..293b03c 100644
--- a/quic/core/quic_received_packet_manager.h
+++ b/quic/core/quic_received_packet_manager.h
@@ -64,8 +64,7 @@
QuicPacketNumber last_received_packet_number,
QuicTime time_of_last_received_packet,
QuicTime now,
- const RttStats* rtt_stats,
- QuicTime::Delta local_max_ack_delay);
+ const RttStats* rtt_stats);
// Resets ACK related states, called after an ACK is successfully sent.
void ResetAckStates();
@@ -119,6 +118,11 @@
ack_frequency_before_ack_decimation_ = new_value;
}
+ QuicTime::Delta local_max_ack_delay() const { return local_max_ack_delay_; }
+ void set_local_max_ack_delay(QuicTime::Delta local_max_ack_delay) {
+ local_max_ack_delay_ = local_max_ack_delay;
+ }
+
QuicTime ack_timeout() const { return ack_timeout_; }
private:
@@ -172,6 +176,9 @@
// was received.
bool fast_ack_after_quiescence_;
+ // The local node's maximum ack delay time. This is the maximum amount of
+ // time to wait before sending an acknowledgement.
+ QuicTime::Delta local_max_ack_delay_;
// Time that an ACK needs to be sent. 0 means no ACK is pending. Used when
// decide_when_to_send_acks_ is true.
QuicTime ack_timeout_;