| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // random bool and returns that value as a member of SerializedPacket. | 110 // random bool and returns that value as a member of SerializedPacket. |
| 111 // Never returns a RetransmittableFrames in SerializedPacket. | 111 // Never returns a RetransmittableFrames in SerializedPacket. |
| 112 SerializedPacket SerializeAllFrames(const QuicFrames& frames, | 112 SerializedPacket SerializeAllFrames(const QuicFrames& frames, |
| 113 char* buffer, | 113 char* buffer, |
| 114 size_t buffer_len); | 114 size_t buffer_len); |
| 115 | 115 |
| 116 // Re-serializes frames with the original packet's packet number length. | 116 // Re-serializes frames with the original packet's packet number length. |
| 117 // Used for retransmitting packets to ensure they aren't too long. | 117 // Used for retransmitting packets to ensure they aren't too long. |
| 118 // Caller must ensure that any open FEC group is closed before calling this | 118 // Caller must ensure that any open FEC group is closed before calling this |
| 119 // method. | 119 // method. |
| 120 SerializedPacket ReserializeAllFrames(const RetransmittableFrames& frames, | 120 SerializedPacket ReserializeAllFrames( |
| 121 QuicPacketNumberLength original_length, | 121 const RetransmittableFrames& frames, |
| 122 char* buffer, | 122 EncryptionLevel original_encryption_level, |
| 123 size_t buffer_len); | 123 QuicPacketNumberLength original_length, |
| 124 char* buffer, |
| 125 size_t buffer_len); |
| 124 | 126 |
| 125 // Serializes all added frames into a single packet and invokes the delegate_ | 127 // Serializes all added frames into a single packet and invokes the delegate_ |
| 126 // to further process the SerializedPacket. | 128 // to further process the SerializedPacket. |
| 127 void Flush(); | 129 void Flush(); |
| 128 | 130 |
| 129 // Returns true if there are frames pending to be serialized. | 131 // Returns true if there are frames pending to be serialized. |
| 130 bool HasPendingFrames() const; | 132 bool HasPendingFrames() const; |
| 131 | 133 |
| 132 // Returns true if there are retransmittable frames pending to be serialized. | 134 // Returns true if there are retransmittable frames pending to be serialized. |
| 133 bool HasPendingRetransmittableFrames() const; | 135 bool HasPendingRetransmittableFrames() const; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 // The multiplication factor for FEC timeout based on RTT. | 378 // The multiplication factor for FEC timeout based on RTT. |
| 377 // TODO(rtenneti): Delete this code after the 0.25 RTT FEC experiment. | 379 // TODO(rtenneti): Delete this code after the 0.25 RTT FEC experiment. |
| 378 float rtt_multiplier_for_fec_timeout_; | 380 float rtt_multiplier_for_fec_timeout_; |
| 379 | 381 |
| 380 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); | 382 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); |
| 381 }; | 383 }; |
| 382 | 384 |
| 383 } // namespace net | 385 } // namespace net |
| 384 | 386 |
| 385 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ | 387 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ |
| OLD | NEW |