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_CORE_QUIC_IOVECTOR_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_IOVECTOR_H_ |
6 #define NET_QUIC_CORE_QUIC_IOVECTOR_H_ | 6 #define NET_QUIC_CORE_QUIC_IOVECTOR_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "net/base/iovec.h" | 10 #include "net/base/iovec.h" |
11 #include "net/base/net_export.h" | 11 #include "net/quic/platform/api/quic_export.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 // Convenience wrapper to wrap an iovec array and the total length, which must | 15 // Convenience wrapper to wrap an iovec array and the total length, which must |
16 // be less than or equal to the actual total length of the iovecs. | 16 // be less than or equal to the actual total length of the iovecs. |
17 struct NET_EXPORT_PRIVATE QuicIOVector { | 17 struct QUIC_EXPORT_PRIVATE QuicIOVector { |
18 QuicIOVector(const struct iovec* iov, int iov_count, size_t total_length) | 18 QuicIOVector(const struct iovec* iov, int iov_count, size_t total_length) |
19 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 19 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
20 | 20 |
21 const struct iovec* iov; | 21 const struct iovec* iov; |
22 const int iov_count; | 22 const int iov_count; |
23 const size_t total_length; | 23 const size_t total_length; |
24 }; | 24 }; |
25 | 25 |
26 } // namespace net | 26 } // namespace net |
27 | 27 |
28 #endif // NET_QUIC_CORE_QUIC_IOVECTOR_H_ | 28 #endif // NET_QUIC_CORE_QUIC_IOVECTOR_H_ |
OLD | NEW |