blob: f802b131b308400efe956e7d687db0f40627e167 [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// 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 team5be974e2020-12-29 18:35:24 -05005#include "quic/core/frames/quic_path_response_frame.h"
vasilvv70430d72019-07-21 12:06:49 -07006
vasilvv72b789c2020-10-27 17:39:17 -07007#include "absl/strings/escaping.h"
QUICHE team5be974e2020-12-29 18:35:24 -05008#include "quic/platform/api/quic_bug_tracker.h"
QUICHE teama6ef0a62019-03-07 20:34:33 -05009
10namespace quic {
11
QUICHE teama6ef0a62019-03-07 20:34:33 -050012QuicPathResponseFrame::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
19QuicPathResponseFrame::~QuicPathResponseFrame() {}
20
21std::ostream& operator<<(std::ostream& os, const QuicPathResponseFrame& frame) {
vasilvv70430d72019-07-21 12:06:49 -070022 os << "{ control_frame_id: " << frame.control_frame_id << ", data: "
vasilvv72b789c2020-10-27 17:39:17 -070023 << absl::BytesToHexString(absl::string_view(
vasilvv70430d72019-07-21 12:06:49 -070024 reinterpret_cast<const char*>(frame.data_buffer.data()),
vasilvv72b789c2020-10-27 17:39:17 -070025 frame.data_buffer.size()))
vasilvv70430d72019-07-21 12:06:49 -070026 << " }\n";
QUICHE teama6ef0a62019-03-07 20:34:33 -050027 return os;
28}
29
30} // namespace quic