| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_FRAMES_QUIC_PADDING_FRAME_H_ | 5 #ifndef NET_QUIC_CORE_FRAMES_QUIC_PADDING_FRAME_H_ |
| 6 #define NET_QUIC_CORE_FRAMES_QUIC_PADDING_FRAME_H_ | 6 #define NET_QUIC_CORE_FRAMES_QUIC_PADDING_FRAME_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <ostream> | 9 #include <ostream> |
| 10 | 10 |
| 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 // A padding frame contains no payload. | 15 // A padding frame contains no payload. |
| 16 struct NET_EXPORT_PRIVATE QuicPaddingFrame { | 16 struct QUIC_EXPORT_PRIVATE QuicPaddingFrame { |
| 17 QuicPaddingFrame() : num_padding_bytes(-1) {} | 17 QuicPaddingFrame() : num_padding_bytes(-1) {} |
| 18 explicit QuicPaddingFrame(int num_padding_bytes) | 18 explicit QuicPaddingFrame(int num_padding_bytes) |
| 19 : num_padding_bytes(num_padding_bytes) {} | 19 : num_padding_bytes(num_padding_bytes) {} |
| 20 | 20 |
| 21 friend NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, | 21 friend QUIC_EXPORT_PRIVATE std::ostream& operator<<( |
| 22 const QuicPaddingFrame& s); | 22 std::ostream& os, |
| 23 const QuicPaddingFrame& s); |
| 23 | 24 |
| 24 // -1: full padding to the end of a max-sized packet | 25 // -1: full padding to the end of a max-sized packet |
| 25 // otherwise: only pad up to num_padding_bytes bytes | 26 // otherwise: only pad up to num_padding_bytes bytes |
| 26 int num_padding_bytes; | 27 int num_padding_bytes; |
| 27 }; | 28 }; |
| 28 | 29 |
| 29 } // namespace net | 30 } // namespace net |
| 30 | 31 |
| 31 #endif // NET_QUIC_CORE_FRAMES_QUIC_PADDING_FRAME_H_ | 32 #endif // NET_QUIC_CORE_FRAMES_QUIC_PADDING_FRAME_H_ |
| OLD | NEW |