| 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. If multipath enabled, only | 7 // FEC packets based on previously created packets. If multipath enabled, only |
| 8 // creates packets on one path at the same time. Currently, next packet number | 8 // creates packets on one path at the same time. Currently, next packet number |
| 9 // is tracked per-path. | 9 // is tracked per-path. |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 // Tries to add |frame| to the packet creator's list of frames to be | 171 // Tries to add |frame| to the packet creator's list of frames to be |
| 172 // serialized. If the frame does not fit into the current packet, flushes the | 172 // serialized. If the frame does not fit into the current packet, flushes the |
| 173 // packet and returns false. | 173 // packet and returns false. |
| 174 bool AddSavedFrame(const QuicFrame& frame); | 174 bool AddSavedFrame(const QuicFrame& frame); |
| 175 | 175 |
| 176 // Identical to AddSavedFrame, but allows the frame to be padded. | 176 // Identical to AddSavedFrame, but allows the frame to be padded. |
| 177 bool AddPaddedSavedFrame(const QuicFrame& frame); | 177 bool AddPaddedSavedFrame(const QuicFrame& frame); |
| 178 | 178 |
| 179 // Adds |listener| to the next serialized packet and notifies the | 179 // Adds |listener| to the next serialized packet and notifies the |
| 180 // std::listener | 180 // std::listener with |length| as the number of acked bytes. |
| 181 // with |length| as the number of acked bytes. | |
| 182 void AddAckListener(QuicAckListenerInterface* listener, | 181 void AddAckListener(QuicAckListenerInterface* listener, |
| 183 QuicPacketLength length); | 182 QuicPacketLength length); |
| 184 | 183 |
| 185 // Creates a version negotiation packet which supports |supported_versions|. | 184 // Creates a version negotiation packet which supports |supported_versions|. |
| 186 // Caller owns the created packet. Also, sets the entropy hash of the | 185 // Caller owns the created packet. Also, sets the entropy hash of the |
| 187 // serialized packet to a random bool and returns that value as a member of | 186 // serialized packet to a random bool and returns that value as a member of |
| 188 // SerializedPacket. | 187 // SerializedPacket. |
| 189 QuicEncryptedPacket* SerializeVersionNegotiationPacket( | 188 QuicEncryptedPacket* SerializeVersionNegotiationPacket( |
| 190 const QuicVersionVector& supported_versions); | 189 const QuicVersionVector& supported_versions); |
| 191 | 190 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 // The multiplication factor for FEC timeout based on RTT. | 412 // The multiplication factor for FEC timeout based on RTT. |
| 414 // TODO(rtenneti): Delete this code after the 0.25 RTT FEC experiment. | 413 // TODO(rtenneti): Delete this code after the 0.25 RTT FEC experiment. |
| 415 float rtt_multiplier_for_fec_timeout_; | 414 float rtt_multiplier_for_fec_timeout_; |
| 416 | 415 |
| 417 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); | 416 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); |
| 418 }; | 417 }; |
| 419 | 418 |
| 420 } // namespace net | 419 } // namespace net |
| 421 | 420 |
| 422 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ | 421 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ |
| OLD | NEW |