| 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 26 matching lines...) Expand all Loading... |
| 37 num_draining_incoming_streams_(0), | 37 num_draining_incoming_streams_(0), |
| 38 num_locally_closed_incoming_streams_highest_offset_(0), | 38 num_locally_closed_incoming_streams_highest_offset_(0), |
| 39 error_(QUIC_NO_ERROR), | 39 error_(QUIC_NO_ERROR), |
| 40 flow_controller_(connection_, | 40 flow_controller_(connection_, |
| 41 0, | 41 0, |
| 42 perspective(), | 42 perspective(), |
| 43 kMinimumFlowControlSendWindow, | 43 kMinimumFlowControlSendWindow, |
| 44 config_.GetInitialSessionFlowControlWindowToSend(), | 44 config_.GetInitialSessionFlowControlWindowToSend(), |
| 45 perspective() == Perspective::IS_SERVER, | 45 perspective() == Perspective::IS_SERVER, |
| 46 nullptr), | 46 nullptr), |
| 47 currently_writing_stream_id_(0), | 47 currently_writing_stream_id_(0) {} |
| 48 flow_control_invariant_( | |
| 49 FLAGS_quic_reloadable_flag_quic_flow_control_invariant) {} | |
| 50 | 48 |
| 51 void QuicSession::Initialize() { | 49 void QuicSession::Initialize() { |
| 52 connection_->set_visitor(this); | 50 connection_->set_visitor(this); |
| 53 connection_->SetFromConfig(config_); | 51 connection_->SetFromConfig(config_); |
| 54 | 52 |
| 55 DCHECK_EQ(kCryptoStreamId, GetCryptoStream()->id()); | 53 DCHECK_EQ(kCryptoStreamId, GetCryptoStream()->id()); |
| 56 static_stream_map_[kCryptoStreamId] = GetCryptoStream(); | 54 static_stream_map_[kCryptoStreamId] = GetCryptoStream(); |
| 57 } | 55 } |
| 58 | 56 |
| 59 QuicSession::~QuicSession() { | 57 QuicSession::~QuicSession() { |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 | 863 |
| 866 size_t QuicSession::MaxAvailableStreams() const { | 864 size_t QuicSession::MaxAvailableStreams() const { |
| 867 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier; | 865 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier; |
| 868 } | 866 } |
| 869 | 867 |
| 870 bool QuicSession::IsIncomingStream(QuicStreamId id) const { | 868 bool QuicSession::IsIncomingStream(QuicStreamId id) const { |
| 871 return id % 2 != next_outgoing_stream_id_ % 2; | 869 return id % 2 != next_outgoing_stream_id_ % 2; |
| 872 } | 870 } |
| 873 | 871 |
| 874 } // namespace net | 872 } // namespace net |
| OLD | NEW |