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

Unified Diff: net/quic/quic_connection.h

Issue 146033003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 6 years, 11 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_client_session_test.cc ('k') | 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 c7b34b759a7d9e664d26ec0ab1087156d2589a1c..0b35c7268915370f3ddba110d2f17568c26fa2dc 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -427,25 +427,6 @@ class NET_EXPORT_PRIVATE QuicConnection
const SerializedPacket& packet,
TransmissionType transmission_type);
- // Writes the given packet to socket, encrypted with |level|, with the help
- // of helper. Returns true on successful write, false otherwise. However,
- // behavior is undefined if connection is not established or broken. In any
- // circumstances, a return value of true implies that |packet| has been
- // transmitted and may be destroyed. If |sequence_number| is present in
- // |retransmission_map_| it also sets up retransmission of the given packet
- // in case of successful write. If |force| is FORCE, then the packet will be
- // sent immediately and the send scheduler will not be consulted.
- bool WritePacket(EncryptionLevel level,
- QuicPacketSequenceNumber sequence_number,
- const QuicPacket& packet,
- TransmissionType transmission_type,
- HasRetransmittableData retransmittable,
- IsHandshake handshake,
- Force force);
-
- // Make sure an ack we got from our peer is sane.
- bool ValidateAckFrame(const QuicAckFrame& incoming_ack);
-
QuicConnectionHelperInterface* helper() { return helper_; }
// Selects and updates the version of the protocol being used by selecting a
@@ -453,8 +434,6 @@ class NET_EXPORT_PRIVATE QuicConnection
// such a version exists, false otherwise.
bool SelectMutualVersion(const QuicVersionVector& available_versions);
- QuicFramer framer_;
-
private:
// Stores current batch state for connection, puts the connection
// into batch mode, and destruction restores the stored batch state.
@@ -532,6 +511,24 @@ class NET_EXPORT_PRIVATE QuicConnection
typedef std::list<QueuedPacket> QueuedPacketList;
typedef std::map<QuicFecGroupNumber, QuicFecGroup*> FecGroupMap;
+ // Writes the given packet to socket, encrypted with |level|. Returns true on
+ // successful write. Behavior is undefined if connection is not established or
+ // broken. In any circumstance, a return value of true implies that |packet|
+ // has been transmitted and may be destroyed. If |sequence_number| is present
+ // in |retransmission_map_| it also sets up retransmission of the given packet
+ // in case of successful write. If |force| is FORCE, then the packet will be
+ // sent immediately and the send scheduler will not be consulted.
+ bool WritePacket(EncryptionLevel level,
+ QuicPacketSequenceNumber sequence_number,
+ const QuicPacket& packet,
+ TransmissionType transmission_type,
+ HasRetransmittableData retransmittable,
+ IsHandshake handshake,
+ Force force);
+
+ // Make sure an ack we got from our peer is sane.
+ bool ValidateAckFrame(const QuicAckFrame& incoming_ack);
+
// Sends a version negotiation packet to the peer.
void SendVersionNegotiationPacket();
@@ -578,13 +575,16 @@ class NET_EXPORT_PRIVATE QuicConnection
// Update the |sent_info| for an outgoing ack.
void UpdateSentPacketInfo(SentPacketInfo* sent_info);
+ // Queues an ack or sets the ack alarm when an incoming packet arrives that
+ // should be acked.
+ void MaybeQueueAck();
+
// Checks if the last packet should instigate an ack.
bool ShouldLastPacketInstigateAck();
// Sends any packets which are a response to the last packet, including both
// acks and pending writes if an ack opened the congestion window.
- void MaybeSendInResponseToPacket(bool send_ack_immediately,
- bool last_packet_should_instigate_ack);
+ void MaybeSendInResponseToPacket();
// Get the FEC group associate with the last processed packet or NULL, if the
// group has already been deleted.
@@ -593,6 +593,7 @@ class NET_EXPORT_PRIVATE QuicConnection
// Closes any FEC groups protecting packets before |sequence_number|.
void CloseFecGroupsBefore(QuicPacketSequenceNumber sequence_number);
+ QuicFramer framer_;
QuicConnectionHelperInterface* helper_; // Not owned.
QuicPacketWriter* writer_; // Not owned.
EncryptionLevel encryption_level_;
@@ -647,6 +648,9 @@ class NET_EXPORT_PRIVATE QuicConnection
QuicReceivedPacketManager received_packet_manager_;
QuicSentEntropyManager sent_entropy_manager_;
+ // Indicates whether an ack should be sent the next time we try to write.
+ bool ack_queued_;
+
// An alarm that fires when an ACK should be sent to the peer.
scoped_ptr<QuicAlarm> ack_alarm_;
// An alarm that fires when a packet needs to be retransmitted.
« no previous file with comments | « net/quic/quic_client_session_test.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698