fkastenholz | 3c4eabf | 2019-04-22 07:49:59 -0700 | [diff] [blame] | 1 | // Copyright (c) 2019 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/third_party/quiche/src/quic/core/frames/quic_max_streams_frame.h" |
| 6 | |
| 7 | namespace quic { |
| 8 | |
| 9 | QuicMaxStreamsFrame::QuicMaxStreamsFrame() |
| 10 | : QuicInlinedFrame(MAX_STREAMS_FRAME), |
| 11 | control_frame_id(kInvalidControlFrameId), |
fayang | 0bf4c9d | 2020-02-05 06:58:41 -0800 | [diff] [blame] | 12 | stream_count(0), |
fkastenholz | 3c4eabf | 2019-04-22 07:49:59 -0700 | [diff] [blame] | 13 | unidirectional(false) {} |
| 14 | |
| 15 | QuicMaxStreamsFrame::QuicMaxStreamsFrame(QuicControlFrameId control_frame_id, |
| 16 | QuicStreamCount stream_count, |
| 17 | bool unidirectional) |
| 18 | : QuicInlinedFrame(MAX_STREAMS_FRAME), |
| 19 | control_frame_id(control_frame_id), |
| 20 | stream_count(stream_count), |
| 21 | unidirectional(unidirectional) {} |
| 22 | |
| 23 | std::ostream& operator<<(std::ostream& os, const QuicMaxStreamsFrame& frame) { |
| 24 | os << "{ control_frame_id: " << frame.control_frame_id |
| 25 | << ", stream_count: " << frame.stream_count |
| 26 | << ((frame.unidirectional) ? ", unidirectional }\n" |
| 27 | : ", bidirectional }\n"); |
| 28 | return os; |
| 29 | } |
| 30 | |
| 31 | } // namespace quic |