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 | |
QUICHE team | 5be974e | 2020-12-29 18:35:24 -0500 | [diff] [blame] | 5 | #include "quic/core/frames/quic_path_response_frame.h" |
vasilvv | 70430d7 | 2019-07-21 12:06:49 -0700 | [diff] [blame] | 6 | |
vasilvv | 72b789c | 2020-10-27 17:39:17 -0700 | [diff] [blame] | 7 | #include "absl/strings/escaping.h" |
QUICHE team | 5be974e | 2020-12-29 18:35:24 -0500 | [diff] [blame] | 8 | #include "quic/platform/api/quic_bug_tracker.h" |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 9 | |
| 10 | namespace quic { |
| 11 | |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 12 | QuicPathResponseFrame::QuicPathResponseFrame( |
| 13 | QuicControlFrameId control_frame_id, |
| 14 | const QuicPathFrameBuffer& data_buff) |
| 15 | : control_frame_id(control_frame_id) { |
| 16 | memcpy(data_buffer.data(), data_buff.data(), data_buffer.size()); |
| 17 | } |
| 18 | |
| 19 | QuicPathResponseFrame::~QuicPathResponseFrame() {} |
| 20 | |
| 21 | std::ostream& operator<<(std::ostream& os, const QuicPathResponseFrame& frame) { |
vasilvv | 70430d7 | 2019-07-21 12:06:49 -0700 | [diff] [blame] | 22 | os << "{ control_frame_id: " << frame.control_frame_id << ", data: " |
vasilvv | 72b789c | 2020-10-27 17:39:17 -0700 | [diff] [blame] | 23 | << absl::BytesToHexString(absl::string_view( |
vasilvv | 70430d7 | 2019-07-21 12:06:49 -0700 | [diff] [blame] | 24 | reinterpret_cast<const char*>(frame.data_buffer.data()), |
vasilvv | 72b789c | 2020-10-27 17:39:17 -0700 | [diff] [blame] | 25 | frame.data_buffer.size())) |
vasilvv | 70430d7 | 2019-07-21 12:06:49 -0700 | [diff] [blame] | 26 | << " }\n"; |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 27 | return os; |
| 28 | } |
| 29 | |
| 30 | } // namespace quic |