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 | |
QUICHE team | 5be974e | 2020-12-29 18:35:24 -0500 | [diff] [blame] | 5 | #include "quic/core/quic_transmission_info.h" |
wub | 662ecf2 | 2020-12-08 07:43:28 -0800 | [diff] [blame] | 6 | #include "absl/strings/str_cat.h" |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 7 | |
| 8 | namespace quic { |
| 9 | |
| 10 | QuicTransmissionInfo::QuicTransmissionInfo() |
haoyuewang | 344e170 | 2020-10-27 07:45:59 -0700 | [diff] [blame] | 11 | : sent_time(QuicTime::Zero()), |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 12 | bytes_sent(0), |
haoyuewang | 344e170 | 2020-10-27 07:45:59 -0700 | [diff] [blame] | 13 | encryption_level(ENCRYPTION_INITIAL), |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 14 | transmission_type(NOT_RETRANSMISSION), |
| 15 | in_flight(false), |
| 16 | state(OUTSTANDING), |
haoyuewang | 5b0f14f | 2020-09-18 14:31:54 -0700 | [diff] [blame] | 17 | has_crypto_handshake(false), |
| 18 | has_ack_frequency(false) {} |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 19 | |
fayang | 88b8723 | 2020-06-24 15:31:08 -0700 | [diff] [blame] | 20 | QuicTransmissionInfo::QuicTransmissionInfo(EncryptionLevel level, |
| 21 | TransmissionType transmission_type, |
| 22 | QuicTime sent_time, |
| 23 | QuicPacketLength bytes_sent, |
haoyuewang | 5b0f14f | 2020-09-18 14:31:54 -0700 | [diff] [blame] | 24 | bool has_crypto_handshake, |
| 25 | bool has_ack_frequency) |
haoyuewang | 344e170 | 2020-10-27 07:45:59 -0700 | [diff] [blame] | 26 | : sent_time(sent_time), |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 27 | bytes_sent(bytes_sent), |
haoyuewang | 344e170 | 2020-10-27 07:45:59 -0700 | [diff] [blame] | 28 | encryption_level(level), |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 29 | transmission_type(transmission_type), |
| 30 | in_flight(false), |
| 31 | state(OUTSTANDING), |
haoyuewang | 5b0f14f | 2020-09-18 14:31:54 -0700 | [diff] [blame] | 32 | has_crypto_handshake(has_crypto_handshake), |
| 33 | has_ack_frequency(has_ack_frequency) {} |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 34 | |
| 35 | QuicTransmissionInfo::QuicTransmissionInfo(const QuicTransmissionInfo& other) = |
| 36 | default; |
| 37 | |
| 38 | QuicTransmissionInfo::~QuicTransmissionInfo() {} |
| 39 | |
wub | 662ecf2 | 2020-12-08 07:43:28 -0800 | [diff] [blame] | 40 | std::string QuicTransmissionInfo::DebugString() const { |
| 41 | return absl::StrCat( |
| 42 | "{sent_time: ", sent_time.ToDebuggingValue(), |
| 43 | ", bytes_sent: ", bytes_sent, |
| 44 | ", encryption_level: ", EncryptionLevelToString(encryption_level), |
| 45 | ", transmission_type: ", TransmissionTypeToString(transmission_type), |
| 46 | ", in_flight: ", in_flight, ", state: ", state, |
| 47 | ", has_crypto_handshake: ", has_crypto_handshake, |
| 48 | ", has_ack_frequency: ", has_ack_frequency, |
| 49 | ", first_sent_after_loss: ", first_sent_after_loss.ToString(), |
| 50 | ", largest_acked: ", largest_acked.ToString(), |
| 51 | ", retransmittable_frames: ", QuicFramesToString(retransmittable_frames), |
| 52 | "}"); |
| 53 | } |
| 54 | |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 55 | } // namespace quic |