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

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

Issue 2759203003: Landing Recent QUIC changes until Thu Mar 16 17:24:53 2017 +0000 (Closed)
Patch Set: float Created 3 years, 9 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/congestion_control/bbr_sender_test.cc ('k') | net/quic/core/quic_data_reader.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_DATA_READER_H_ 5 #ifndef NET_QUIC_CORE_QUIC_DATA_READER_H_
6 #define NET_QUIC_CORE_QUIC_DATA_READER_H_ 6 #define NET_QUIC_CORE_QUIC_DATA_READER_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <cstdint> 9 #include <cstdint>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Forwards the internal iterator on success. 65 // Forwards the internal iterator on success.
66 // Returns true on success, false otherwise. 66 // Returns true on success, false otherwise.
67 bool ReadStringPiece16(QuicStringPiece* result); 67 bool ReadStringPiece16(QuicStringPiece* result);
68 68
69 // Reads a given number of bytes into the given buffer. The buffer 69 // Reads a given number of bytes into the given buffer. The buffer
70 // must be of adequate size. 70 // must be of adequate size.
71 // Forwards the internal iterator on success. 71 // Forwards the internal iterator on success.
72 // Returns true on success, false otherwise. 72 // Returns true on success, false otherwise.
73 bool ReadStringPiece(QuicStringPiece* result, size_t len); 73 bool ReadStringPiece(QuicStringPiece* result, size_t len);
74 74
75 // Reads connection ID represented as 64-bit unsigned integer into the given
76 // output parameter.
77 // Forwards the internal iterator on success.
78 // Returns true on success, false otherwise.
79 // TODO(fayang): Remove this method and use ReadUInt64() once deprecating
80 // quic_restart_flag_quic_rw_cid_in_big_endian and QuicDataReader has a mode
81 // indicating reading in little/big endian.
82 bool ReadConnectionId(uint64_t* connection_id);
83
75 // Returns the remaining payload as a QuicStringPiece. 84 // Returns the remaining payload as a QuicStringPiece.
76 // 85 //
77 // NOTE: Does not copy but rather references strings in the underlying buffer. 86 // NOTE: Does not copy but rather references strings in the underlying buffer.
78 // This should be kept in mind when handling memory management! 87 // This should be kept in mind when handling memory management!
79 // 88 //
80 // Forwards the internal iterator. 89 // Forwards the internal iterator.
81 QuicStringPiece ReadRemainingPayload(); 90 QuicStringPiece ReadRemainingPayload();
82 91
83 // Returns the remaining payload as a QuicStringPiece. 92 // Returns the remaining payload as a QuicStringPiece.
84 // 93 //
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 126
118 // The location of the next read from our data buffer. 127 // The location of the next read from our data buffer.
119 size_t pos_; 128 size_t pos_;
120 129
121 DISALLOW_COPY_AND_ASSIGN(QuicDataReader); 130 DISALLOW_COPY_AND_ASSIGN(QuicDataReader);
122 }; 131 };
123 132
124 } // namespace net 133 } // namespace net
125 134
126 #endif // NET_QUIC_CORE_QUIC_DATA_READER_H_ 135 #endif // NET_QUIC_CORE_QUIC_DATA_READER_H_
OLDNEW
« no previous file with comments | « net/quic/core/congestion_control/bbr_sender_test.cc ('k') | net/quic/core/quic_data_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698