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/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 Loading... |
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 |
OLD | NEW |