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; | |
651 | 650 |
652 typedef std::list<std::pair<QuicPacketSequenceNumber, QuicTime>> PacketTimeList; | 651 typedef std::list<std::pair<QuicPacketSequenceNumber, QuicTime>> PacketTimeList; |
653 | 652 |
654 struct NET_EXPORT_PRIVATE QuicStopWaitingFrame { | 653 struct NET_EXPORT_PRIVATE QuicStopWaitingFrame { |
655 QuicStopWaitingFrame(); | 654 QuicStopWaitingFrame(); |
656 ~QuicStopWaitingFrame(); | 655 ~QuicStopWaitingFrame(); |
657 | 656 |
658 NET_EXPORT_PRIVATE friend std::ostream& operator<<( | 657 NET_EXPORT_PRIVATE friend std::ostream& operator<<( |
659 std::ostream& os, const QuicStopWaitingFrame& s); | 658 std::ostream& os, const QuicStopWaitingFrame& s); |
660 // Entropy hash of all packets up to, but not including, the least unacked | 659 // 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... |
1047 std::set<QuicAckNotifier*> notifiers; | 1046 std::set<QuicAckNotifier*> notifiers; |
1048 }; | 1047 }; |
1049 | 1048 |
1050 struct NET_EXPORT_PRIVATE TransmissionInfo { | 1049 struct NET_EXPORT_PRIVATE TransmissionInfo { |
1051 // Used by STL when assigning into a map. | 1050 // Used by STL when assigning into a map. |
1052 TransmissionInfo(); | 1051 TransmissionInfo(); |
1053 | 1052 |
1054 // Constructs a Transmission with a new all_tranmissions set | 1053 // Constructs a Transmission with a new all_tranmissions set |
1055 // containing |sequence_number|. | 1054 // containing |sequence_number|. |
1056 TransmissionInfo(RetransmittableFrames* retransmittable_frames, | 1055 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, |
1062 QuicSequenceNumberLength sequence_number_length, | 1063 QuicSequenceNumberLength sequence_number_length, |
1063 TransmissionType transmission_type, | 1064 TransmissionType transmission_type, |
1064 SequenceNumberList* all_transmissions); | 1065 SequenceNumberSet* all_transmissions); |
1065 | 1066 |
1066 RetransmittableFrames* retransmittable_frames; | 1067 RetransmittableFrames* retransmittable_frames; |
1067 QuicSequenceNumberLength sequence_number_length; | 1068 QuicSequenceNumberLength sequence_number_length; |
1068 // Zero when the packet is serialized, non-zero once it's sent. | 1069 // Zero when the packet is serialized, non-zero once it's sent. |
1069 QuicTime sent_time; | 1070 QuicTime sent_time; |
1070 // Zero when the packet is serialized, non-zero once it's sent. | 1071 // Zero when the packet is serialized, non-zero once it's sent. |
1071 QuicByteCount bytes_sent; | 1072 QuicByteCount bytes_sent; |
1072 size_t nack_count; | 1073 size_t nack_count; |
1073 // Reason why this packet was transmitted. | 1074 // Reason why this packet was transmitted. |
1074 TransmissionType transmission_type; | 1075 TransmissionType transmission_type; |
1075 // Stores the sequence numbers of all transmissions of this packet. | 1076 // Stores the sequence numbers of all transmissions of this packet. |
1076 // Can never be null. | 1077 // Can never be null. |
1077 SequenceNumberList* all_transmissions; | 1078 SequenceNumberSet* all_transmissions; |
1078 // In flight packets have not been abandoned or lost. | 1079 // In flight packets have not been abandoned or lost. |
1079 bool in_flight; | 1080 bool in_flight; |
1080 }; | 1081 }; |
1081 | 1082 |
1082 } // namespace net | 1083 } // namespace net |
1083 | 1084 |
1084 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1085 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |