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

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

Issue 2842373003: In QUIC v39, read and write integers and floating numbers in big endian. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « net/quic/core/quic_data_reader.h ('k') | net/quic/core/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_CORE_QUIC_FRAMER_H_ 5 #ifndef NET_QUIC_CORE_QUIC_FRAMER_H_
6 #define NET_QUIC_CORE_QUIC_FRAMER_H_ 6 #define NET_QUIC_CORE_QUIC_FRAMER_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <cstdint> 9 #include <cstdint>
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "net/quic/core/quic_packets.h" 14 #include "net/quic/core/quic_packets.h"
15 #include "net/quic/platform/api/quic_endian.h"
15 #include "net/quic/platform/api/quic_export.h" 16 #include "net/quic/platform/api/quic_export.h"
16 #include "net/quic/platform/api/quic_string_piece.h" 17 #include "net/quic/platform/api/quic_string_piece.h"
17 18
18 namespace net { 19 namespace net {
19 20
20 namespace test { 21 namespace test {
21 class QuicFramerPeer; 22 class QuicFramerPeer;
22 } // namespace test 23 } // namespace test
23 24
24 class QuicDataReader; 25 class QuicDataReader;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 314
314 // The minimum packet number length required to represent |packet_number|. 315 // The minimum packet number length required to represent |packet_number|.
315 static QuicPacketNumberLength GetMinPacketNumberLength( 316 static QuicPacketNumberLength GetMinPacketNumberLength(
316 QuicPacketNumber packet_number); 317 QuicPacketNumber packet_number);
317 318
318 void SetSupportedVersions(const QuicVersionVector& versions) { 319 void SetSupportedVersions(const QuicVersionVector& versions) {
319 supported_versions_ = versions; 320 supported_versions_ = versions;
320 quic_version_ = versions[0]; 321 quic_version_ = versions[0];
321 } 322 }
322 323
324 // Returns byte order to read/write integers and floating numbers.
325 Endianness endianness() const;
326
323 void set_validate_flags(bool value) { validate_flags_ = value; } 327 void set_validate_flags(bool value) { validate_flags_ = value; }
324 328
325 Perspective perspective() const { return perspective_; } 329 Perspective perspective() const { return perspective_; }
326 330
327 QuicTag last_version_tag() { return last_version_tag_; } 331 QuicTag last_version_tag() { return last_version_tag_; }
328 332
329 private: 333 private:
330 friend class test::QuicFramerPeer; 334 friend class test::QuicFramerPeer;
331 335
332 typedef std::map<QuicPacketNumber, uint8_t> NackRangeMap; 336 typedef std::map<QuicPacketNumber, uint8_t> NackRangeMap;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 QuicTime::Delta last_timestamp_; 528 QuicTime::Delta last_timestamp_;
525 // The diversification nonce from the last received packet. 529 // The diversification nonce from the last received packet.
526 DiversificationNonce last_nonce_; 530 DiversificationNonce last_nonce_;
527 531
528 DISALLOW_COPY_AND_ASSIGN(QuicFramer); 532 DISALLOW_COPY_AND_ASSIGN(QuicFramer);
529 }; 533 };
530 534
531 } // namespace net 535 } // namespace net
532 536
533 #endif // NET_QUIC_CORE_QUIC_FRAMER_H_ 537 #endif // NET_QUIC_CORE_QUIC_FRAMER_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_data_reader.h ('k') | net/quic/core/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698