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 "quiche/quic/core/frames/quic_new_token_frame.h" 6 7 #include "absl/strings/escaping.h" 8 #include "quiche/quic/platform/api/quic_logging.h" 9 10 namespace quic { 11 QuicNewTokenFrame(QuicControlFrameId control_frame_id,absl::string_view token)12QuicNewTokenFrame::QuicNewTokenFrame(QuicControlFrameId control_frame_id, 13 absl::string_view token) 14 : control_frame_id(control_frame_id), 15 token(std::string(token.data(), token.length())) {} 16 operator <<(std::ostream & os,const QuicNewTokenFrame & s)17std::ostream& operator<<(std::ostream& os, const QuicNewTokenFrame& s) { 18 os << "{ control_frame_id: " << s.control_frame_id 19 << ", token: " << absl::BytesToHexString(s.token) << " }\n"; 20 return os; 21 } 22 23 } // namespace quic 24