Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: net/quic/quic_packet_generator.h

Issue 326403006: Enables PacketGenerator's use of PacketCreator's FEC primitives. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.h
diff --git a/net/quic/quic_packet_generator.h b/net/quic/quic_packet_generator.h
index 957477a2da427d9037e9fec45973d62cca4e1f75..e9c773b910ae3dd2ea2a4b97ffe08c82aa02d528 100644
--- a/net/quic/quic_packet_generator.h
+++ b/net/quic/quic_packet_generator.h
@@ -58,6 +58,10 @@
namespace net {
+namespace test {
+class QuicPacketGeneratorPeer;
+} // namespace test
+
class QuicAckNotifier;
class NET_EXPORT_PRIVATE QuicPacketGenerator {
@@ -137,6 +141,30 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
}
private:
+ friend class test::QuicPacketGeneratorPeer;
+
+ // Turn on FEC protection for subsequent packets in the generator.
+ // If no FEC group is currently open in the creator, this method flushes any
+ // queued frames in the generator and in the creator, and it then turns FEC on
+ // in the creator. This method may be called with an open FEC group in the
+ // creator, in which case, only the generator's state is altered.
+ void MaybeStartFecProtection();
+
+ // Turn off FEC protection for subsequent packets. If |force| is true,
+ // force-closes any open FEC group, sends out an FEC packet if one was under
+ // construction, and turns off protection in the generator and creator. If
+ // |force| is false, does the same as above if the creator is ready to send
+ // and FEC packet. Note that when |force| is false, the creator may still have
+ // an open FEC group after this method runs.
+ void MaybeStopFecProtection(bool force);
+
+ // Serializes and calls the delegate on an FEC packet if one was under
+ // construction in the creator. When |force| is false, it relies on the
+ // creator being ready to send an FEC packet, otherwise FEC packet is sent
+ // as long as one is under construction in the creator. Also tries to turns
+ // off FEC protection in the creator if it's off in the generator.
+ void MaybeSendFecPacketAndCloseGroup(bool force);
+
void SendQueuedFrames(bool flush);
// Test to see if we have pending ack, feedback, or control frames.
@@ -161,6 +189,9 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
// True if batch mode is currently enabled.
bool batch_mode_;
+ // True if FEC protection is on.
+ bool should_fec_protect_;
+
// Flags to indicate the need for just-in-time construction of a frame.
bool should_send_ack_;
bool should_send_feedback_;
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698