| 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 20 matching lines...) Expand all Loading... |
| 31 public: | 31 public: |
| 32 // QuicRandom* required for packet entropy. | 32 // QuicRandom* required for packet entropy. |
| 33 QuicPacketCreator(QuicConnectionId connection_id, | 33 QuicPacketCreator(QuicConnectionId connection_id, |
| 34 QuicFramer* framer, | 34 QuicFramer* framer, |
| 35 QuicRandom* random_generator); | 35 QuicRandom* random_generator); |
| 36 | 36 |
| 37 virtual ~QuicPacketCreator(); | 37 virtual ~QuicPacketCreator(); |
| 38 | 38 |
| 39 // QuicFecBuilderInterface | 39 // QuicFecBuilderInterface |
| 40 virtual void OnBuiltFecProtectedPayload(const QuicPacketHeader& header, | 40 virtual void OnBuiltFecProtectedPayload(const QuicPacketHeader& header, |
| 41 base::StringPiece payload) OVERRIDE; | 41 base::StringPiece payload) override; |
| 42 | 42 |
| 43 // Turn on FEC protection for subsequently created packets. FEC should be | 43 // Turn on FEC protection for subsequently created packets. FEC should be |
| 44 // enabled first (max_packets_per_fec_group should be non-zero) for FEC | 44 // enabled first (max_packets_per_fec_group should be non-zero) for FEC |
| 45 // protection to start. | 45 // protection to start. |
| 46 void StartFecProtectingPackets(); | 46 void StartFecProtectingPackets(); |
| 47 | 47 |
| 48 // Turn off FEC protection for subsequently created packets. If the creator | 48 // Turn off FEC protection for subsequently created packets. If the creator |
| 49 // has any open FEC group, call will fail. It is the caller's responsibility | 49 // has any open FEC group, call will fail. It is the caller's responsibility |
| 50 // to flush out FEC packets in generation, and to verify with ShouldSendFec() | 50 // to flush out FEC packets in generation, and to verify with ShouldSendFec() |
| 51 // that there is no open FEC group. | 51 // that there is no open FEC group. |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 mutable size_t packet_size_; | 287 mutable size_t packet_size_; |
| 288 QuicFrames queued_frames_; | 288 QuicFrames queued_frames_; |
| 289 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_; | 289 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_; |
| 290 | 290 |
| 291 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); | 291 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); |
| 292 }; | 292 }; |
| 293 | 293 |
| 294 } // namespace net | 294 } // namespace net |
| 295 | 295 |
| 296 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ | 296 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ |
| OLD | NEW |