QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_CORE_FRAMES_QUIC_PING_FRAME_H_ |
| 6 | #define QUICHE_QUIC_CORE_FRAMES_QUIC_PING_FRAME_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h" |
| 9 | #include "net/third_party/quiche/src/quic/core/quic_constants.h" |
| 10 | #include "net/third_party/quiche/src/quic/core/quic_types.h" |
| 11 | #include "net/third_party/quiche/src/quic/platform/api/quic_export.h" |
| 12 | |
| 13 | namespace quic { |
| 14 | |
| 15 | // A ping frame contains no payload, though it is retransmittable, |
| 16 | // and ACK'd just like other normal frames. |
| 17 | struct QUIC_EXPORT_PRIVATE QuicPingFrame |
| 18 | : public QuicInlinedFrame<QuicPingFrame> { |
| 19 | QuicPingFrame(); |
| 20 | explicit QuicPingFrame(QuicControlFrameId control_frame_id); |
| 21 | |
| 22 | friend QUIC_EXPORT_PRIVATE std::ostream& operator<<( |
| 23 | std::ostream& os, |
| 24 | const QuicPingFrame& ping_frame); |
| 25 | |
| 26 | // A unique identifier of this control frame. 0 when this frame is received, |
| 27 | // and non-zero when sent. |
| 28 | QuicControlFrameId control_frame_id; |
| 29 | }; |
| 30 | |
| 31 | } // namespace quic |
| 32 | |
| 33 | #endif // QUICHE_QUIC_CORE_FRAMES_QUIC_PING_FRAME_H_ |