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

Side by Side Diff: net/quic/quic_framer.h

Issue 300623009: Fixes bugs in packet size computation in the creator and in the framer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_QUIC_FRAMER_H_ 5 #ifndef NET_QUIC_QUIC_FRAMER_H_
6 #define NET_QUIC_QUIC_FRAMER_H_ 6 #define NET_QUIC_QUIC_FRAMER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 const size_t kQuicMaxStreamOffsetSize = 8; 39 const size_t kQuicMaxStreamOffsetSize = 8;
40 // Number of bytes reserved to store payload length in stream frame. 40 // Number of bytes reserved to store payload length in stream frame.
41 const size_t kQuicStreamPayloadLengthSize = 2; 41 const size_t kQuicStreamPayloadLengthSize = 2;
42 42
43 // Size in bytes of the entropy hash sent in ack frames. 43 // Size in bytes of the entropy hash sent in ack frames.
44 const size_t kQuicEntropyHashSize = 1; 44 const size_t kQuicEntropyHashSize = 1;
45 // Size in bytes reserved for the delta time of the largest observed 45 // Size in bytes reserved for the delta time of the largest observed
46 // sequence number in ack frames. 46 // sequence number in ack frames.
47 const size_t kQuicDeltaTimeLargestObservedSize = 2; 47 const size_t kQuicDeltaTimeLargestObservedSize = 2;
48 // Size in bytes reserved for the number of missing packets in ack frames. 48 // Size in bytes reserved for the number of missing packets in ack frames.
49 const size_t kNumberOfMissingPacketsSize = 1; 49 const size_t kNumberOfNackRangesSize = 1;
50 // Maximum number of missing packet ranges that can fit within an ack frame.
51 const size_t kMaxNackRanges =
52 (1 << (kNumberOfNackRangesSize * 8)) - 1;
50 // Size in bytes reserved for the number of revived packets in ack frames. 53 // Size in bytes reserved for the number of revived packets in ack frames.
51 const size_t kNumberOfRevivedPacketsSize = 1; 54 const size_t kNumberOfRevivedPacketsSize = 1;
55 // Maximum number of revived packets that can fit within an ack frame.
56 const size_t kMaxRevivedPackets =
57 (1 << (kNumberOfRevivedPacketsSize * 8)) - 1;
52 58
53 // This class receives callbacks from the framer when packets 59 // This class receives callbacks from the framer when packets
54 // are processed. 60 // are processed.
55 class NET_EXPORT_PRIVATE QuicFramerVisitorInterface { 61 class NET_EXPORT_PRIVATE QuicFramerVisitorInterface {
56 public: 62 public:
57 virtual ~QuicFramerVisitorInterface() {} 63 virtual ~QuicFramerVisitorInterface() {}
58 64
59 // Called if an error is detected in the QUIC protocol. 65 // Called if an error is detected in the QUIC protocol.
60 virtual void OnError(QuicFramer* framer) = 0; 66 virtual void OnError(QuicFramer* framer) = 0;
61 67
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 // The time this frames was created. Time written to the wire will be 537 // The time this frames was created. Time written to the wire will be
532 // written as a delta from this value. 538 // written as a delta from this value.
533 QuicTime creation_time_; 539 QuicTime creation_time_;
534 540
535 DISALLOW_COPY_AND_ASSIGN(QuicFramer); 541 DISALLOW_COPY_AND_ASSIGN(QuicFramer);
536 }; 542 };
537 543
538 } // namespace net 544 } // namespace net
539 545
540 #endif // NET_QUIC_QUIC_FRAMER_H_ 546 #endif // NET_QUIC_QUIC_FRAMER_H_
OLDNEW
« 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