Add a new callback for probing retransmissions.
Whenever the connection needs to send probing retransmissions it calls the
session to decide what data to send.
gfe-relnote: n/a (probing retransmissions only used by Quartc)
PiperOrigin-RevId: 245817562
Change-Id: I2239c32ea4e2f6aa7dd6f733045ccc8fa0da4dc5
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index 5d35353..fe74768 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -8063,6 +8063,10 @@
EXPECT_CALL(visitor_, WillingAndAbleToWrite())
.WillRepeatedly(Return(false));
}
+ EXPECT_CALL(visitor_, SendProbingData()).WillRepeatedly([this] {
+ return connection_.sent_packet_manager().MaybeRetransmitOldestPacket(
+ PROBING_RETRANSMISSION);
+ });
// Fix congestion window to be 20,000 bytes.
EXPECT_CALL(*send_algorithm_, CanSend(Ge(20000u)))
.WillRepeatedly(Return(false));
@@ -8209,6 +8213,10 @@
}));
EXPECT_CALL(*send_algorithm_, ShouldSendProbingPacket())
.WillRepeatedly(Return(true));
+ EXPECT_CALL(visitor_, SendProbingData()).WillRepeatedly([this] {
+ return connection_.sent_packet_manager().MaybeRetransmitOldestPacket(
+ PROBING_RETRANSMISSION);
+ });
connection_.SendProbingRetransmissions();
@@ -8232,6 +8240,10 @@
EXPECT_CALL(debug_visitor, OnPacketSent(_, _, _, _)).Times(0);
EXPECT_CALL(*send_algorithm_, ShouldSendProbingPacket())
.WillRepeatedly(Return(true));
+ EXPECT_CALL(visitor_, SendProbingData()).WillRepeatedly([this] {
+ return connection_.sent_packet_manager().MaybeRetransmitOldestPacket(
+ PROBING_RETRANSMISSION);
+ });
connection_.SendProbingRetransmissions();
}