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

Unified Diff: net/quic/quic_connection.h

Issue 243533003: Sent QUIC "PING" frames when a stream is open and the connection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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 | « no previous file | net/quic/quic_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.h
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index 6c8a2e50f91d06b31f19a74baf498c4251d67038..3a51a49bd8c614d2fda59a2e63bac40009e778bf 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -103,6 +103,10 @@ class NET_EXPORT_PRIVATE QuicConnectionVisitorInterface {
// Called to ask if any handshake messages are pending in this visitor.
virtual bool HasPendingHandshake() const = 0;
+
+ // Called to ask if any streams are open in this visitor, excluding the
+ // reserved crypto and headers stream.
+ virtual bool HasOpenDataStreams() const = 0;
};
// Interface which gets callbacks from the QuicConnection at interesting
@@ -391,6 +395,9 @@ class NET_EXPORT_PRIVATE QuicConnection
// true. Otherwise, it will return false and will reset the timeout alarm.
bool CheckForTimeout();
+ // Sends a ping, and resets the ping alarm.
+ void SendPing();
+
// Sets up a packet with an QuicAckFrame and sends it out.
void SendAck();
@@ -590,6 +597,9 @@ class NET_EXPORT_PRIVATE QuicConnection
// Closes any FEC groups protecting packets before |sequence_number|.
void CloseFecGroupsBefore(QuicPacketSequenceNumber sequence_number);
+ // Sets the ping alarm to the appropriate value, if any.
+ void SetPingAlarm();
+
QuicFramer framer_;
QuicConnectionHelperInterface* helper_; // Not owned.
QuicPacketWriter* writer_; // Not owned.
@@ -669,6 +679,8 @@ class NET_EXPORT_PRIVATE QuicConnection
scoped_ptr<QuicAlarm> resume_writes_alarm_;
// An alarm that fires when the connection may have timed out.
scoped_ptr<QuicAlarm> timeout_alarm_;
+ // An alarm that fires when a ping should be sent.
+ scoped_ptr<QuicAlarm> ping_alarm_;
QuicConnectionVisitorInterface* visitor_;
QuicConnectionDebugVisitorInterface* debug_visitor_;
« no previous file with comments | « no previous file | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698