1 // Copyright (c) 2016 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 #ifndef QUICHE_QUIC_CORE_FRAMES_QUIC_GOAWAY_FRAME_H_ 6 #define QUICHE_QUIC_CORE_FRAMES_QUIC_GOAWAY_FRAME_H_ 7 8 #include <ostream> 9 #include <string> 10 11 #include "net/third_party/quiche/src/quic/core/quic_constants.h" 12 #include "net/third_party/quiche/src/quic/core/quic_error_codes.h" 13 #include "net/third_party/quiche/src/quic/core/quic_types.h" 14 15 namespace quic { 16 17 struct QUIC_EXPORT_PRIVATE QuicGoAwayFrame { 18 QuicGoAwayFrame() = default; 19 QuicGoAwayFrame(QuicControlFrameId control_frame_id, 20 QuicErrorCode error_code, 21 QuicStreamId last_good_stream_id, 22 const std::string& reason); 23 24 friend QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, 25 const QuicGoAwayFrame& g); 26 27 // A unique identifier of this control frame. 0 when this frame is received, 28 // and non-zero when sent. 29 QuicControlFrameId control_frame_id = kInvalidControlFrameId; 30 QuicErrorCode error_code = QUIC_NO_ERROR; 31 QuicStreamId last_good_stream_id = 0; 32 std::string reason_phrase; 33 }; 34 35 } // namespace quic 36 37 #endif // QUICHE_QUIC_CORE_FRAMES_QUIC_GOAWAY_FRAME_H_ 38