| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
| 6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 IOVector data; | 640 IOVector data; |
| 641 | 641 |
| 642 // If this is set, then when this packet is ACKed the AckNotifier will be | 642 // If this is set, then when this packet is ACKed the AckNotifier will be |
| 643 // informed. | 643 // informed. |
| 644 QuicAckNotifier* notifier; | 644 QuicAckNotifier* notifier; |
| 645 }; | 645 }; |
| 646 | 646 |
| 647 // TODO(ianswett): Re-evaluate the trade-offs of hash_set vs set when framing | 647 // TODO(ianswett): Re-evaluate the trade-offs of hash_set vs set when framing |
| 648 // is finalized. | 648 // is finalized. |
| 649 typedef std::set<QuicPacketSequenceNumber> SequenceNumberSet; | 649 typedef std::set<QuicPacketSequenceNumber> SequenceNumberSet; |
| 650 typedef std::list<QuicPacketSequenceNumber> SequenceNumberList; |
| 650 | 651 |
| 651 typedef std::list<std::pair<QuicPacketSequenceNumber, QuicTime>> PacketTimeList; | 652 typedef std::list<std::pair<QuicPacketSequenceNumber, QuicTime>> PacketTimeList; |
| 652 | 653 |
| 653 struct NET_EXPORT_PRIVATE QuicStopWaitingFrame { | 654 struct NET_EXPORT_PRIVATE QuicStopWaitingFrame { |
| 654 QuicStopWaitingFrame(); | 655 QuicStopWaitingFrame(); |
| 655 ~QuicStopWaitingFrame(); | 656 ~QuicStopWaitingFrame(); |
| 656 | 657 |
| 657 NET_EXPORT_PRIVATE friend std::ostream& operator<<( | 658 NET_EXPORT_PRIVATE friend std::ostream& operator<<( |
| 658 std::ostream& os, const QuicStopWaitingFrame& s); | 659 std::ostream& os, const QuicStopWaitingFrame& s); |
| 659 // Entropy hash of all packets up to, but not including, the least unacked | 660 // Entropy hash of all packets up to, but not including, the least unacked |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 std::set<QuicAckNotifier*> notifiers; | 1047 std::set<QuicAckNotifier*> notifiers; |
| 1047 }; | 1048 }; |
| 1048 | 1049 |
| 1049 struct NET_EXPORT_PRIVATE TransmissionInfo { | 1050 struct NET_EXPORT_PRIVATE TransmissionInfo { |
| 1050 // Used by STL when assigning into a map. | 1051 // Used by STL when assigning into a map. |
| 1051 TransmissionInfo(); | 1052 TransmissionInfo(); |
| 1052 | 1053 |
| 1053 // Constructs a Transmission with a new all_tranmissions set | 1054 // Constructs a Transmission with a new all_tranmissions set |
| 1054 // containing |sequence_number|. | 1055 // containing |sequence_number|. |
| 1055 TransmissionInfo(RetransmittableFrames* retransmittable_frames, | 1056 TransmissionInfo(RetransmittableFrames* retransmittable_frames, |
| 1056 QuicPacketSequenceNumber sequence_number, | |
| 1057 QuicSequenceNumberLength sequence_number_length); | 1057 QuicSequenceNumberLength sequence_number_length); |
| 1058 | 1058 |
| 1059 // Constructs a Transmission with the specified |all_tranmissions| set | 1059 // Constructs a Transmission with the specified |all_tranmissions| set |
| 1060 // and inserts |sequence_number| into it. | 1060 // and inserts |sequence_number| into it. |
| 1061 TransmissionInfo(RetransmittableFrames* retransmittable_frames, | 1061 TransmissionInfo(RetransmittableFrames* retransmittable_frames, |
| 1062 QuicPacketSequenceNumber sequence_number, | |
| 1063 QuicSequenceNumberLength sequence_number_length, | 1062 QuicSequenceNumberLength sequence_number_length, |
| 1064 TransmissionType transmission_type, | 1063 TransmissionType transmission_type, |
| 1065 SequenceNumberSet* all_transmissions); | 1064 SequenceNumberList* all_transmissions); |
| 1066 | 1065 |
| 1067 RetransmittableFrames* retransmittable_frames; | 1066 RetransmittableFrames* retransmittable_frames; |
| 1068 QuicSequenceNumberLength sequence_number_length; | 1067 QuicSequenceNumberLength sequence_number_length; |
| 1069 // Zero when the packet is serialized, non-zero once it's sent. | 1068 // Zero when the packet is serialized, non-zero once it's sent. |
| 1070 QuicTime sent_time; | 1069 QuicTime sent_time; |
| 1071 // Zero when the packet is serialized, non-zero once it's sent. | 1070 // Zero when the packet is serialized, non-zero once it's sent. |
| 1072 QuicByteCount bytes_sent; | 1071 QuicByteCount bytes_sent; |
| 1073 size_t nack_count; | 1072 size_t nack_count; |
| 1074 // Reason why this packet was transmitted. | 1073 // Reason why this packet was transmitted. |
| 1075 TransmissionType transmission_type; | 1074 TransmissionType transmission_type; |
| 1076 // Stores the sequence numbers of all transmissions of this packet. | 1075 // Stores the sequence numbers of all transmissions of this packet. |
| 1077 // Can never be null. | 1076 // Can never be null. |
| 1078 SequenceNumberSet* all_transmissions; | 1077 SequenceNumberList* all_transmissions; |
| 1079 // In flight packets have not been abandoned or lost. | 1078 // In flight packets have not been abandoned or lost. |
| 1080 bool in_flight; | 1079 bool in_flight; |
| 1081 }; | 1080 }; |
| 1082 | 1081 |
| 1083 } // namespace net | 1082 } // namespace net |
| 1084 | 1083 |
| 1085 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1084 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |