Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: net/tools/quic/quic_server_session_base.cc

Issue 1651153005: changes QUIC negotiation about max open streams which effects server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113042237
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_client_session.cc ('k') | net/tools/quic/quic_server_session_base_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/tools/quic/quic_server_session_base.h" 5 #include "net/tools/quic/quic_server_session_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/proto/cached_network_parameters.pb.h" 8 #include "net/quic/proto/cached_network_parameters.pb.h"
9 #include "net/quic/quic_bug_tracker.h" 9 #include "net/quic/quic_bug_tracker.h"
10 #include "net/quic/quic_connection.h" 10 #include "net/quic/quic_connection.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 bool QuicServerSessionBase::ShouldCreateOutgoingDynamicStream() { 194 bool QuicServerSessionBase::ShouldCreateOutgoingDynamicStream() {
195 if (!connection()->connected()) { 195 if (!connection()->connected()) {
196 QUIC_BUG << "ShouldCreateOutgoingDynamicStream called when disconnected"; 196 QUIC_BUG << "ShouldCreateOutgoingDynamicStream called when disconnected";
197 return false; 197 return false;
198 } 198 }
199 if (!crypto_stream_->encryption_established()) { 199 if (!crypto_stream_->encryption_established()) {
200 QUIC_BUG << "Encryption not established so no outgoing stream created."; 200 QUIC_BUG << "Encryption not established so no outgoing stream created.";
201 return false; 201 return false;
202 } 202 }
203 if (GetNumOpenOutgoingStreams() >= get_max_open_streams()) { 203 if (GetNumOpenOutgoingStreams() >= max_open_outgoing_streams()) {
204 VLOG(1) << "No more streams should be created. " 204 VLOG(1) << "No more streams should be created. "
205 << "Already " << GetNumOpenOutgoingStreams() << " open."; 205 << "Already " << GetNumOpenOutgoingStreams() << " open.";
206 return false; 206 return false;
207 } 207 }
208 return true; 208 return true;
209 } 209 }
210 210
211 QuicCryptoServerStreamBase* QuicServerSessionBase::GetCryptoStream() { 211 QuicCryptoServerStreamBase* QuicServerSessionBase::GetCryptoStream() {
212 return crypto_stream_.get(); 212 return crypto_stream_.get();
213 } 213 }
214 214
215 } // namespace net 215 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_session.cc ('k') | net/tools/quic/quic_server_session_base_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698