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

Unified Diff: net/quic/quic_protocol.h

Issue 23464033: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix valgrind error Created 7 years, 3 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_generator.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.h
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index bd478ff53aa553be941903be8799581b31a54860..fa4b9eaa15118ed2de5465540793666c3e1e1460 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -27,6 +27,7 @@ namespace net {
using ::operator<<;
+class QuicAckNotifier;
class QuicPacket;
struct QuicPacketHeader;
@@ -99,12 +100,12 @@ enum IsHandshake {
enum QuicFrameType {
PADDING_FRAME = 0,
- STREAM_FRAME,
- ACK_FRAME,
- CONGESTION_FEEDBACK_FRAME,
RST_STREAM_FRAME,
CONNECTION_CLOSE_FRAME,
GOAWAY_FRAME,
+ STREAM_FRAME,
+ ACK_FRAME,
+ CONGESTION_FEEDBACK_FRAME,
NUM_FRAME_TYPES
};
@@ -190,7 +191,8 @@ enum QuicVersion {
QUIC_VERSION_7 = 7,
QUIC_VERSION_8 = 8,
- QUIC_VERSION_9 = 9, // Current version.
+ QUIC_VERSION_9 = 9,
+ QUIC_VERSION_10 = 10, // Current version.
};
// This vector contains QUIC versions which we currently support.
@@ -198,7 +200,7 @@ enum QuicVersion {
// element, with subsequent elements in descending order (versions can be
// skipped as necessary).
static const QuicVersion kSupportedQuicVersions[] =
- {QUIC_VERSION_9};
+ {QUIC_VERSION_10, QUIC_VERSION_9};
typedef std::vector<QuicVersion> QuicVersionVector;
@@ -472,6 +474,10 @@ struct NET_EXPORT_PRIVATE QuicStreamFrame {
bool fin;
QuicStreamOffset offset; // Location of this data in the stream.
base::StringPiece data;
+
+ // If this is set, then when this packet is ACKed the AckNotifier will be
+ // informed.
+ QuicAckNotifier* notifier;
};
// TODO(ianswett): Re-evaluate the trade-offs of hash_set vs set when framing
@@ -827,28 +833,24 @@ struct NET_EXPORT_PRIVATE SerializedPacket {
QuicSequenceNumberLength sequence_number_length,
QuicPacket* packet,
QuicPacketEntropyHash entropy_hash,
- RetransmittableFrames* retransmittable_frames)
- : sequence_number(sequence_number),
- sequence_number_length(sequence_number_length),
- packet(packet),
- entropy_hash(entropy_hash),
- retransmittable_frames(retransmittable_frames) {}
+ RetransmittableFrames* retransmittable_frames);
+ ~SerializedPacket();
QuicPacketSequenceNumber sequence_number;
QuicSequenceNumberLength sequence_number_length;
QuicPacket* packet;
QuicPacketEntropyHash entropy_hash;
RetransmittableFrames* retransmittable_frames;
+
+ // If set, these will be called when this packet is ACKed by the peer.
+ std::set<QuicAckNotifier*> notifiers;
};
// A struct for functions which consume data payloads and fins.
-// The first member of the pair indicates bytes consumed.
-// The second member of the pair indicates if an incoming fin was consumed.
struct QuicConsumedData {
QuicConsumedData(size_t bytes_consumed, bool fin_consumed)
: bytes_consumed(bytes_consumed),
fin_consumed(fin_consumed) {}
-
// By default, gtest prints the raw bytes of an object. The bool data
// member causes this object to have padding bytes, which causes the
// default gtest object printer to read uninitialize memory. So we need
@@ -856,7 +858,10 @@ struct QuicConsumedData {
NET_EXPORT_PRIVATE friend std::ostream& operator<<(
std::ostream& os, const QuicConsumedData& s);
+ // How many bytes were consumed.
size_t bytes_consumed;
+
+ // True if an incoming fin was consumed.
bool fin_consumed;
};
« no previous file with comments | « net/quic/quic_packet_generator.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698