blob: c73e6cb7bfbae7534d1935612a4a681abaa13bd0 [file] [log] [blame]
// Copyright (c) 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "quic/core/frames/quic_goaway_frame.h"
namespace quic {
QuicGoAwayFrame::QuicGoAwayFrame(QuicControlFrameId control_frame_id,
QuicErrorCode error_code,
QuicStreamId last_good_stream_id,
const std::string& reason)
: control_frame_id(control_frame_id),
error_code(error_code),
last_good_stream_id(last_good_stream_id),
reason_phrase(reason) {}
std::ostream& operator<<(std::ostream& os,
const QuicGoAwayFrame& goaway_frame) {
os << "{ control_frame_id: " << goaway_frame.control_frame_id
<< ", error_code: " << goaway_frame.error_code
<< ", last_good_stream_id: " << goaway_frame.last_good_stream_id
<< ", reason_phrase: '" << goaway_frame.reason_phrase << "' }\n";
return os;
}
} // namespace quic