OLD | NEW |
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_DATA_READER_H_ | 5 #ifndef NET_QUIC_QUIC_DATA_READER_H_ |
6 #define NET_QUIC_QUIC_DATA_READER_H_ | 6 #define NET_QUIC_QUIC_DATA_READER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
| 10 #include "net/base/int128.h" |
10 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
11 #include "net/quic/uint128.h" | |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 // Used for reading QUIC data. Though there isn't really anything terribly | 15 // Used for reading QUIC data. Though there isn't really anything terribly |
16 // QUIC-specific here, it's a helper class that's useful when doing QUIC | 16 // QUIC-specific here, it's a helper class that's useful when doing QUIC |
17 // framing. | 17 // framing. |
18 // | 18 // |
19 // To use, simply construct a QuicDataReader using the underlying buffer that | 19 // To use, simply construct a QuicDataReader using the underlying buffer that |
20 // you'd like to read fields from, then call one of the Read*() methods to | 20 // you'd like to read fields from, then call one of the Read*() methods to |
21 // actually do some reading. | 21 // actually do some reading. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // The length of the data buffer that we're reading from. | 116 // The length of the data buffer that we're reading from. |
117 const size_t len_; | 117 const size_t len_; |
118 | 118 |
119 // The location of the next read from our data buffer. | 119 // The location of the next read from our data buffer. |
120 size_t pos_; | 120 size_t pos_; |
121 }; | 121 }; |
122 | 122 |
123 } // namespace net | 123 } // namespace net |
124 | 124 |
125 #endif // NET_QUIC_QUIC_DATA_READER_H_ | 125 #endif // NET_QUIC_QUIC_DATA_READER_H_ |
OLD | NEW |