OLD | NEW |
(Empty) | |
| 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 #include "net/quic/core/frames/quic_goaway_frame.h" |
| 6 |
| 7 using std::ostream; |
| 8 using std::string; |
| 9 |
| 10 namespace net { |
| 11 |
| 12 QuicGoAwayFrame::QuicGoAwayFrame() |
| 13 : error_code(QUIC_NO_ERROR), last_good_stream_id(0) {} |
| 14 |
| 15 QuicGoAwayFrame::QuicGoAwayFrame(QuicErrorCode error_code, |
| 16 QuicStreamId last_good_stream_id, |
| 17 const string& reason) |
| 18 : error_code(error_code), |
| 19 last_good_stream_id(last_good_stream_id), |
| 20 reason_phrase(reason) {} |
| 21 |
| 22 ostream& operator<<(ostream& os, const QuicGoAwayFrame& goaway_frame) { |
| 23 os << "{ error_code: " << goaway_frame.error_code |
| 24 << ", last_good_stream_id: " << goaway_frame.last_good_stream_id |
| 25 << ", reason_phrase: '" << goaway_frame.reason_phrase << "' }\n"; |
| 26 return os; |
| 27 } |
| 28 |
| 29 } // namespace net |
OLD | NEW |