| Index: net/quic/quic_packet_generator.h
|
| diff --git a/net/quic/quic_packet_generator.h b/net/quic/quic_packet_generator.h
|
| index 24dc97c4772264efa74f4423ea74902807fa9cbd..beb7db95f3ac7f0ff9b41bf2f0fca6fd3c6934fb 100644
|
| --- a/net/quic/quic_packet_generator.h
|
| +++ b/net/quic/quic_packet_generator.h
|
| @@ -171,6 +171,16 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
|
| // Set the minimum number of bytes for the connection id length;
|
| void SetConnectionIdLength(uint32 length);
|
|
|
| + // Called when the FEC alarm fires.
|
| + void OnFecTimeout();
|
| +
|
| + // Called after sending |sequence_number| to determine whether an FEC alarm
|
| + // should be set for sending out an FEC packet. Returns a positive and finite
|
| + // timeout if an FEC alarm should be set, and infinite if no alarm should be
|
| + // set. OnFecTimeout should be called to send the FEC packet when the alarm
|
| + // fires.
|
| + QuicTime::Delta GetFecTimeout(QuicPacketSequenceNumber sequence_number);
|
| +
|
| // Sets the encryption level that will be applied to new packets.
|
| void set_encryption_level(EncryptionLevel level);
|
|
|
| @@ -186,8 +196,6 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
|
| debug_delegate_ = debug_delegate;
|
| }
|
|
|
| - QuicTime::Delta fec_timeout() { return fec_timeout_; }
|
| -
|
| private:
|
| friend class test::QuicPacketGeneratorPeer;
|
|
|
| @@ -205,6 +213,10 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
|
| // off FEC protection in the creator if it's off in the generator.
|
| void MaybeSendFecPacketAndCloseGroup(bool force);
|
|
|
| + // Returns true if an FEC packet should be generated based on |force| and
|
| + // current state of the generator and the creator.
|
| + bool ShouldSendFecPacket(bool force);
|
| +
|
| void SendQueuedFrames(bool flush);
|
|
|
| // Test to see if we have pending ack, feedback, or control frames.
|
| @@ -229,7 +241,8 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
|
| // True if batch mode is currently enabled.
|
| bool batch_mode_;
|
|
|
| - // Timeout used for FEC alarm. Can be set to zero.
|
| + // Timeout used for FEC alarm. Can be set to zero initially or if the SRTT has
|
| + // not yet been set.
|
| QuicTime::Delta fec_timeout_;
|
|
|
| // True if FEC protection is on. The creator may have an open FEC group even
|
|
|