QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright (c) 2018 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 | #include "net/third_party/quiche/src/quic/core/frames/quic_path_challenge_frame.h" |
vasilvv | 70430d7 | 2019-07-21 12:06:49 -0700 | [diff] [blame] | 6 | |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 7 | #include "net/third_party/quiche/src/quic/core/quic_constants.h" |
| 8 | #include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h" |
vasilvv | 70430d7 | 2019-07-21 12:06:49 -0700 | [diff] [blame] | 9 | #include "net/third_party/quiche/src/quic/platform/api/quic_text_utils.h" |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 10 | |
| 11 | namespace quic { |
| 12 | |
| 13 | QuicPathChallengeFrame::QuicPathChallengeFrame() |
| 14 | : control_frame_id(kInvalidControlFrameId) {} |
| 15 | |
| 16 | QuicPathChallengeFrame::QuicPathChallengeFrame( |
| 17 | QuicControlFrameId control_frame_id, |
| 18 | const QuicPathFrameBuffer& data_buff) |
| 19 | : control_frame_id(control_frame_id) { |
| 20 | memcpy(data_buffer.data(), data_buff.data(), data_buffer.size()); |
| 21 | } |
| 22 | |
| 23 | QuicPathChallengeFrame::~QuicPathChallengeFrame() {} |
| 24 | |
| 25 | std::ostream& operator<<(std::ostream& os, |
| 26 | const QuicPathChallengeFrame& frame) { |
vasilvv | 70430d7 | 2019-07-21 12:06:49 -0700 | [diff] [blame] | 27 | os << "{ control_frame_id: " << frame.control_frame_id << ", data: " |
| 28 | << QuicTextUtils::HexEncode( |
| 29 | reinterpret_cast<const char*>(frame.data_buffer.data()), |
| 30 | frame.data_buffer.size()) |
| 31 | << " }\n"; |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 32 | return os; |
| 33 | } |
| 34 | |
| 35 | } // namespace quic |