1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-10 21:22:20 +03:00

custom variant type for read frames

Summary:
Create a custom type for read frame types. This allows us to reduce size of code.
We use a macro to generate new variant types whenever we need to.

Reviewed By: yangchi

Differential Revision: D17266468

fbshipit-source-id: 59a1183dce728e71f0924f39f95a7b78449642b0
This commit is contained in:
Subodh Iyengar
2019-10-03 18:12:13 -07:00
committed by Facebook Github Bot
parent 7eb28023fb
commit 95f509ae54
12 changed files with 1164 additions and 744 deletions

View File

@@ -111,9 +111,8 @@ TEST_F(QuicReadCodecTest, RetryPacketTest) {
auto packetQueue = bufToQueue(std::move(packet));
AckStates ackStates;
auto retryPacket = *makeUnencryptedCodec()
->parsePacket(packetQueue, ackStates)
.regularPacket();
auto result = makeUnencryptedCodec()->parsePacket(packetQueue, ackStates);
auto& retryPacket = *result.regularPacket();
auto headerOut = *retryPacket.header.asLong();