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 // Accumulates frames for the next packet until more frames no longer fit or | 5 // Accumulates frames for the next packet until more frames no longer fit or |
6 // it's time to create a packet from them. Also provides packet creation of | 6 // it's time to create a packet from them. Also provides packet creation of |
7 // FEC packets based on previously created packets. | 7 // FEC packets based on previously created packets. |
8 | 8 |
9 #ifndef NET_QUIC_QUIC_PACKET_CREATOR_H_ | 9 #ifndef NET_QUIC_QUIC_PACKET_CREATOR_H_ |
10 #define NET_QUIC_QUIC_PACKET_CREATOR_H_ | 10 #define NET_QUIC_QUIC_PACKET_CREATOR_H_ |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Used for retransmitting packets to ensure they aren't too long. | 109 // Used for retransmitting packets to ensure they aren't too long. |
110 // Caller must ensure that any open FEC group is closed before calling this | 110 // Caller must ensure that any open FEC group is closed before calling this |
111 // method. | 111 // method. |
112 SerializedPacket ReserializeAllFrames( | 112 SerializedPacket ReserializeAllFrames( |
113 const QuicFrames& frames, | 113 const QuicFrames& frames, |
114 QuicSequenceNumberLength original_length); | 114 QuicSequenceNumberLength original_length); |
115 | 115 |
116 // Returns true if there are frames pending to be serialized. | 116 // Returns true if there are frames pending to be serialized. |
117 bool HasPendingFrames() const; | 117 bool HasPendingFrames() const; |
118 | 118 |
| 119 // Returns true if there are retransmittable frames pending to be serialized. |
| 120 bool HasPendingRetransmittableFrames() const; |
| 121 |
119 // Returns whether FEC protection is currently enabled. Note: Enabled does not | 122 // Returns whether FEC protection is currently enabled. Note: Enabled does not |
120 // mean that an FEC group is currently active; i.e., IsFecProtected() may | 123 // mean that an FEC group is currently active; i.e., IsFecProtected() may |
121 // still return false. | 124 // still return false. |
122 bool IsFecEnabled() const; | 125 bool IsFecEnabled() const; |
123 | 126 |
124 // Returns true if subsequent packets will be FEC protected. Note: True does | 127 // Returns true if subsequent packets will be FEC protected. Note: True does |
125 // not mean that an FEC packet is currently under construction; i.e., | 128 // not mean that an FEC packet is currently under construction; i.e., |
126 // fec_group_.get() may still be NULL, until MaybeStartFec() is called. | 129 // fec_group_.get() may still be NULL, until MaybeStartFec() is called. |
127 bool IsFecProtected() const; | 130 bool IsFecProtected() const; |
128 | 131 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 mutable size_t packet_size_; | 290 mutable size_t packet_size_; |
288 QuicFrames queued_frames_; | 291 QuicFrames queued_frames_; |
289 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_; | 292 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_; |
290 | 293 |
291 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); | 294 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); |
292 }; | 295 }; |
293 | 296 |
294 } // namespace net | 297 } // namespace net |
295 | 298 |
296 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ | 299 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ |
OLD | NEW |