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 "quiche/quic/core/frames/quic_inlined_frame.h" 9 #include "quiche/quic/core/quic_constants.h" 10 #include "quiche/quic/core/quic_types.h" 11 #include "quiche/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 QUICHE_EXPORT QuicPingFrame : public QuicInlinedFrame<QuicPingFrame> { 18 QuicPingFrame(); 19 explicit QuicPingFrame(QuicControlFrameId control_frame_id); 20 21 friend QUICHE_EXPORT std::ostream& operator<<( 22 std::ostream& os, const QuicPingFrame& ping_frame); 23 24 QuicFrameType type; 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 = kInvalidControlFrameId; 29 }; 30 31 } // namespace quic 32 33 #endif // QUICHE_QUIC_CORE_FRAMES_QUIC_PING_FRAME_H_ 34