| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/quic/core/quic_session.h" | 5 #include "net/quic/core/quic_session.h" |
| 6 | 6 |
| 7 #include <cstdint> | 7 #include <cstdint> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "net/quic/core/quic_connection.h" | 10 #include "net/quic/core/quic_connection.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 const QuicVersion version = connection()->version(); | 439 const QuicVersion version = connection()->version(); |
| 440 uint32_t max_streams = 0; | 440 uint32_t max_streams = 0; |
| 441 if (version > QUIC_VERSION_34 && | 441 if (version > QUIC_VERSION_34 && |
| 442 config_.HasReceivedMaxIncomingDynamicStreams()) { | 442 config_.HasReceivedMaxIncomingDynamicStreams()) { |
| 443 max_streams = config_.ReceivedMaxIncomingDynamicStreams(); | 443 max_streams = config_.ReceivedMaxIncomingDynamicStreams(); |
| 444 } else { | 444 } else { |
| 445 max_streams = config_.MaxStreamsPerConnection(); | 445 max_streams = config_.MaxStreamsPerConnection(); |
| 446 } | 446 } |
| 447 set_max_open_outgoing_streams(max_streams); | 447 set_max_open_outgoing_streams(max_streams); |
| 448 if (FLAGS_quic_reloadable_flag_quic_large_ifw_options && | 448 if (perspective() == Perspective::IS_SERVER) { |
| 449 perspective() == Perspective::IS_SERVER) { | |
| 450 if (config_.HasReceivedConnectionOptions()) { | 449 if (config_.HasReceivedConnectionOptions()) { |
| 451 // The following variations change the initial receive flow control | 450 // The following variations change the initial receive flow control |
| 452 // window sizes. | 451 // window sizes. |
| 453 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW6)) { | 452 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW6)) { |
| 454 AdjustInitialFlowControlWindows(64 * 1024); | 453 AdjustInitialFlowControlWindows(64 * 1024); |
| 455 } | 454 } |
| 456 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW7)) { | 455 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW7)) { |
| 457 AdjustInitialFlowControlWindows(128 * 1024); | 456 AdjustInitialFlowControlWindows(128 * 1024); |
| 458 } | 457 } |
| 459 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW8)) { | 458 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW8)) { |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 | 866 |
| 868 size_t QuicSession::MaxAvailableStreams() const { | 867 size_t QuicSession::MaxAvailableStreams() const { |
| 869 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier; | 868 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier; |
| 870 } | 869 } |
| 871 | 870 |
| 872 bool QuicSession::IsIncomingStream(QuicStreamId id) const { | 871 bool QuicSession::IsIncomingStream(QuicStreamId id) const { |
| 873 return id % 2 != next_outgoing_stream_id_ % 2; | 872 return id % 2 != next_outgoing_stream_id_ % 2; |
| 874 } | 873 } |
| 875 | 874 |
| 876 } // namespace net | 875 } // namespace net |
| OLD | NEW |