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

Unified Diff: net/quic/quic_framer.h

Issue 478153003: Change the wire format of the ack frame to include a compressed version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT and pass clock to QuicTestPacketMaker and use it in AckPacket Created 6 years, 4 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_connection_test.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_framer.h
diff --git a/net/quic/quic_framer.h b/net/quic/quic_framer.h
index a958786c1d7b6003851f59ba58e5a7e13bacc0f0..348980387904d5ce2ab59e6dd2ca36d1534d6549 100644
--- a/net/quic/quic_framer.h
+++ b/net/quic/quic_framer.h
@@ -45,6 +45,8 @@ const size_t kQuicEntropyHashSize = 1;
// Size in bytes reserved for the delta time of the largest observed
// sequence number in ack frames.
const size_t kQuicDeltaTimeLargestObservedSize = 2;
+// Size in bytes reserved for the number of received packets with timestamps.
+const size_t kQuicNumTimestampsSize = 1;
// Size in bytes reserved for the number of missing packets in ack frames.
const size_t kNumberOfNackRangesSize = 1;
// Maximum number of missing packet ranges that can fit within an ack frame.
@@ -409,9 +411,10 @@ class NET_EXPORT_PRIVATE QuicFramer {
bool ProcessFrameData(const QuicPacketHeader& header);
bool ProcessStreamFrame(uint8 frame_type, QuicStreamFrame* frame);
bool ProcessAckFrame(uint8 frame_type, QuicAckFrame* frame);
+ bool ProcessTimestampsInAckFrame(QuicAckFrame* frame);
bool ProcessStopWaitingFrame(const QuicPacketHeader& public_header,
QuicStopWaitingFrame* stop_waiting);
- bool ProcessQuicCongestionFeedbackFrame(
+ bool ProcessCongestionFeedbackFrame(
QuicCongestionFeedbackFrame* congestion_feedback);
bool ProcessRstStreamFrame(QuicRstStreamFrame* frame);
bool ProcessConnectionCloseFrame(QuicConnectionCloseFrame* frame);
@@ -428,6 +431,10 @@ class NET_EXPORT_PRIVATE QuicFramer {
QuicSequenceNumberLength sequence_number_length,
QuicPacketSequenceNumber packet_sequence_number) const;
+ // Returns the QuicTime::Delta corresponding to the time from when the framer
+ // was created.
+ const QuicTime::Delta CalculateTimestampFromWire(uint32 time_delta_us);
+
// Computes the wire size in bytes of the |ack| frame, assuming no truncation.
size_t GetAckFrameSize(const QuicAckFrame& ack,
QuicSequenceNumberLength sequence_number_length);
@@ -463,6 +470,8 @@ class NET_EXPORT_PRIVATE QuicFramer {
QuicDataWriter* builder);
bool AppendCongestionFeedbackFrame(const QuicCongestionFeedbackFrame& frame,
QuicDataWriter* builder);
+ bool AppendTimestampToAckFrame(const QuicAckFrame& frame,
+ QuicDataWriter* builder);
bool AppendStopWaitingFrame(const QuicPacketHeader& header,
const QuicStopWaitingFrame& frame,
QuicDataWriter* builder);
@@ -527,6 +536,9 @@ class NET_EXPORT_PRIVATE QuicFramer {
// The time this framer was created. Time written to the wire will be
// written as a delta from this value.
QuicTime creation_time_;
+ // The time delta computed for the last timestamp frame. This is relative to
+ // the creation_time.
+ QuicTime::Delta last_timestamp_;
DISALLOW_COPY_AND_ASSIGN(QuicFramer);
};
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698