Add GetLargestGuaranteedMessagePayload to QuicSession/Connection/Generator/Creator to expose the largest message payload that's guaranteed to fit in any packet containing application data.
gfe-relnote: n/a (Only used in Quartc)
PiperOrigin-RevId: 242135946
Change-Id: I52cc763af88d22fc240210e00cf4d4062d0b9c59
diff --git a/quic/core/quic_packet_generator_test.cc b/quic/core/quic_packet_generator_test.cc
index bc20bfe..09abb31 100644
--- a/quic/core/quic_packet_generator_test.cc
+++ b/quic/core/quic_packet_generator_test.cc
@@ -1531,9 +1531,10 @@
EXPECT_EQ(
MESSAGE_STATUS_SUCCESS,
generator_.AddMessageFrame(
- 2, MakeSpan(&allocator_,
- std::string(generator_.GetLargestMessagePayload(), 'a'),
- &storage)));
+ 2, MakeSpan(
+ &allocator_,
+ std::string(generator_.GetCurrentLargestMessagePayload(), 'a'),
+ &storage)));
EXPECT_TRUE(generator_.HasRetransmittableFrames());
// Failed to send messages which cannot fit into one packet.
@@ -1542,7 +1543,8 @@
generator_.AddMessageFrame(
3,
MakeSpan(&allocator_,
- std::string(generator_.GetLargestMessagePayload() + 10, 'a'),
+ std::string(
+ generator_.GetCurrentLargestMessagePayload() + 10, 'a'),
&storage)));
}