| 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 | 654 |
| 655 // Returns a copy of the IOVector |data| as a heap-allocated string. | 655 // Returns a copy of the IOVector |data| as a heap-allocated string. |
| 656 // Caller must take ownership of the returned string. | 656 // Caller must take ownership of the returned string. |
| 657 std::string* GetDataAsString() const; | 657 std::string* GetDataAsString() const; |
| 658 | 658 |
| 659 QuicStreamId stream_id; | 659 QuicStreamId stream_id; |
| 660 bool fin; | 660 bool fin; |
| 661 QuicStreamOffset offset; // Location of this data in the stream. | 661 QuicStreamOffset offset; // Location of this data in the stream. |
| 662 IOVector data; | 662 IOVector data; |
| 663 | 663 |
| 664 // TODO(rjshade): Remove with FLAGS_quic_attach_ack_notifiers_to_packets. |
| 664 // If this is set, then when this packet is ACKed the AckNotifier will be | 665 // If this is set, then when this packet is ACKed the AckNotifier will be |
| 665 // informed. | 666 // informed. |
| 666 QuicAckNotifier* notifier; | 667 QuicAckNotifier* notifier; |
| 667 }; | 668 }; |
| 668 | 669 |
| 669 // TODO(ianswett): Re-evaluate the trade-offs of hash_set vs set when framing | 670 // TODO(ianswett): Re-evaluate the trade-offs of hash_set vs set when framing |
| 670 // is finalized. | 671 // is finalized. |
| 671 typedef std::set<QuicPacketSequenceNumber> SequenceNumberSet; | 672 typedef std::set<QuicPacketSequenceNumber> SequenceNumberSet; |
| 672 typedef std::list<QuicPacketSequenceNumber> SequenceNumberList; | 673 typedef std::list<QuicPacketSequenceNumber> SequenceNumberList; |
| 673 | 674 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 QuicPacketEntropyHash entropy_hash, | 1060 QuicPacketEntropyHash entropy_hash, |
| 1060 RetransmittableFrames* retransmittable_frames); | 1061 RetransmittableFrames* retransmittable_frames); |
| 1061 ~SerializedPacket(); | 1062 ~SerializedPacket(); |
| 1062 | 1063 |
| 1063 QuicPacketSequenceNumber sequence_number; | 1064 QuicPacketSequenceNumber sequence_number; |
| 1064 QuicSequenceNumberLength sequence_number_length; | 1065 QuicSequenceNumberLength sequence_number_length; |
| 1065 QuicPacket* packet; | 1066 QuicPacket* packet; |
| 1066 QuicPacketEntropyHash entropy_hash; | 1067 QuicPacketEntropyHash entropy_hash; |
| 1067 RetransmittableFrames* retransmittable_frames; | 1068 RetransmittableFrames* retransmittable_frames; |
| 1068 | 1069 |
| 1069 // If set, these will be called when this packet is ACKed by the peer. | 1070 // Optional notifiers which will be informed when this packet has been ACKed. |
| 1070 std::set<QuicAckNotifier*> notifiers; | 1071 base::hash_set<QuicAckNotifier*> notifiers; |
| 1071 }; | 1072 }; |
| 1072 | 1073 |
| 1073 struct NET_EXPORT_PRIVATE TransmissionInfo { | 1074 struct NET_EXPORT_PRIVATE TransmissionInfo { |
| 1074 // Used by STL when assigning into a map. | 1075 // Used by STL when assigning into a map. |
| 1075 TransmissionInfo(); | 1076 TransmissionInfo(); |
| 1076 | 1077 |
| 1077 // Constructs a Transmission with a new all_tranmissions set | 1078 // Constructs a Transmission with a new all_tranmissions set |
| 1078 // containing |sequence_number|. | 1079 // containing |sequence_number|. |
| 1079 TransmissionInfo(RetransmittableFrames* retransmittable_frames, | 1080 TransmissionInfo(RetransmittableFrames* retransmittable_frames, |
| 1080 QuicSequenceNumberLength sequence_number_length, | 1081 QuicSequenceNumberLength sequence_number_length, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1097 bool in_flight; | 1098 bool in_flight; |
| 1098 // True if the packet can never be acked, so it can be removed. | 1099 // True if the packet can never be acked, so it can be removed. |
| 1099 bool is_unackable; | 1100 bool is_unackable; |
| 1100 // True if the packet is an FEC packet. | 1101 // True if the packet is an FEC packet. |
| 1101 bool is_fec_packet; | 1102 bool is_fec_packet; |
| 1102 }; | 1103 }; |
| 1103 | 1104 |
| 1104 } // namespace net | 1105 } // namespace net |
| 1105 | 1106 |
| 1106 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1107 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |