QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_CORE_QUIC_PENDING_RETRANSMISSION_H_ |
| 6 | #define QUICHE_QUIC_CORE_QUIC_PENDING_RETRANSMISSION_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/quic/core/frames/quic_frame.h" |
| 9 | #include "net/third_party/quiche/src/quic/core/quic_transmission_info.h" |
| 10 | #include "net/third_party/quiche/src/quic/core/quic_types.h" |
| 11 | #include "net/third_party/quiche/src/quic/platform/api/quic_export.h" |
| 12 | |
| 13 | namespace quic { |
| 14 | |
| 15 | // Struct to store the pending retransmission information. |
| 16 | struct QUIC_EXPORT_PRIVATE QuicPendingRetransmission { |
| 17 | QuicPendingRetransmission(QuicPacketNumber packet_number, |
| 18 | TransmissionType transmission_type, |
| 19 | const QuicFrames& retransmittable_frames, |
| 20 | bool has_crypto_handshake, |
| 21 | int num_padding_bytes, |
| 22 | EncryptionLevel encryption_level, |
| 23 | QuicPacketNumberLength packet_number_length) |
| 24 | : packet_number(packet_number), |
| 25 | retransmittable_frames(retransmittable_frames), |
| 26 | transmission_type(transmission_type), |
| 27 | has_crypto_handshake(has_crypto_handshake), |
| 28 | num_padding_bytes(num_padding_bytes), |
| 29 | encryption_level(encryption_level), |
| 30 | packet_number_length(packet_number_length) {} |
| 31 | |
| 32 | QuicPendingRetransmission(QuicPacketNumber packet_number, |
| 33 | TransmissionType transmission_type, |
| 34 | const QuicTransmissionInfo& tranmission_info) |
| 35 | : packet_number(packet_number), |
| 36 | retransmittable_frames(tranmission_info.retransmittable_frames), |
| 37 | transmission_type(transmission_type), |
| 38 | has_crypto_handshake(tranmission_info.has_crypto_handshake), |
| 39 | num_padding_bytes(tranmission_info.num_padding_bytes), |
| 40 | encryption_level(tranmission_info.encryption_level), |
| 41 | packet_number_length(tranmission_info.packet_number_length) {} |
| 42 | |
| 43 | QuicPacketNumber packet_number; |
| 44 | const QuicFrames& retransmittable_frames; |
| 45 | TransmissionType transmission_type; |
| 46 | bool has_crypto_handshake; |
| 47 | int num_padding_bytes; |
| 48 | EncryptionLevel encryption_level; |
| 49 | QuicPacketNumberLength packet_number_length; |
| 50 | }; |
| 51 | |
| 52 | } // namespace quic |
| 53 | |
| 54 | #endif // QUICHE_QUIC_CORE_QUIC_PENDING_RETRANSMISSION_H_ |