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

Unified Diff: net/quic/quic_framer.h

Issue 18307003: Implement the variable length changes necessary to easily accommodate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merging with TOT Created 7 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_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 76410db83bb74445eee2ca1a74a0d4b79c47ff10..dd3eaef554752f0b70201b2bf0e0f71c8b99cc6a 100644
--- a/net/quic/quic_framer.h
+++ b/net/quic/quic_framer.h
@@ -222,6 +222,10 @@ class NET_EXPORT_PRIVATE QuicFramer {
// Size in bytes of all stream frame fields without the payload.
static size_t GetMinStreamFrameSize();
+ // Size in bytes of all stream frame fields without the payload.
+ static size_t GetMinStreamFrameSize(QuicStreamId stream_id,
+ QuicStreamOffset offset,
+ bool last_frame);
// Size in bytes of all ack frame fields without the missing packets.
static size_t GetMinAckFrameSize();
// Size in bytes of all reset stream frame without the error details.
@@ -234,6 +238,10 @@ class NET_EXPORT_PRIVATE QuicFramer {
// The maximum number of nacks which can be transmitted in a single ack packet
// without exceeding kMaxPacketSize.
static size_t GetMaxUnackedPackets(QuicPacketHeader header);
+ // Size in bytes required to serialize the stream id.
+ static size_t GetStreamIdSize(QuicStreamId stream_id);
+ // Size in bytes required to serialize the stream offset.
+ static size_t GetStreamOffsetSize(QuicStreamOffset offset);
// Size in bytes required for a serialized version negotiation packet
size_t GetVersionNegotiationPacketSize(size_t number_versions);
@@ -367,7 +375,7 @@ class NET_EXPORT_PRIVATE QuicFramer {
QuicPacketSequenceNumber packet_sequence_number) const;
// Computes the wire size in bytes of the payload of |frame|.
- size_t ComputeFrameLength(const QuicFrame& frame);
+ size_t ComputeFrameLength(const QuicFrame& frame, bool last_frame);
static bool AppendPacketSequenceNumber(
QuicSequenceNumberLength sequence_number_length,
« 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