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_client_session.h" | 5 #include "net/tools/quic/quic_client_session.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/quic/crypto/crypto_protocol.h" | 8 #include "net/quic/crypto/crypto_protocol.h" |
9 #include "net/quic/quic_server_id.h" | 9 #include "net/quic/quic_server_id.h" |
10 #include "net/tools/quic/quic_spdy_client_stream.h" | 10 #include "net/tools/quic/quic_spdy_client_stream.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 QuicClientSession::~QuicClientSession() { | 27 QuicClientSession::~QuicClientSession() { |
28 } | 28 } |
29 | 29 |
30 void QuicClientSession::OnProofValid( | 30 void QuicClientSession::OnProofValid( |
31 const QuicCryptoClientConfig::CachedState& /*cached*/) {} | 31 const QuicCryptoClientConfig::CachedState& /*cached*/) {} |
32 | 32 |
33 void QuicClientSession::OnProofVerifyDetailsAvailable( | 33 void QuicClientSession::OnProofVerifyDetailsAvailable( |
34 const ProofVerifyDetails& /*verify_details*/) {} | 34 const ProofVerifyDetails& /*verify_details*/) {} |
35 | 35 |
36 QuicSpdyClientStream* QuicClientSession::CreateOutgoingDataStream() { | 36 QuicSpdyClientStream* QuicClientSession::CreateOutgoingDynamicStream() { |
37 if (!crypto_stream_->encryption_established()) { | 37 if (!crypto_stream_->encryption_established()) { |
38 DVLOG(1) << "Encryption not active so no outgoing stream created."; | 38 DVLOG(1) << "Encryption not active so no outgoing stream created."; |
39 return nullptr; | 39 return nullptr; |
40 } | 40 } |
41 if (GetNumOpenStreams() >= get_max_open_streams()) { | 41 if (GetNumOpenStreams() >= get_max_open_streams()) { |
42 DVLOG(1) << "Failed to create a new outgoing stream. " | 42 DVLOG(1) << "Failed to create a new outgoing stream. " |
43 << "Already " << GetNumOpenStreams() << " open."; | 43 << "Already " << GetNumOpenStreams() << " open."; |
44 return nullptr; | 44 return nullptr; |
45 } | 45 } |
46 if (goaway_received() && respect_goaway_) { | 46 if (goaway_received() && respect_goaway_) { |
(...skipping 13 matching lines...) Expand all Loading... |
60 | 60 |
61 void QuicClientSession::CryptoConnect() { | 61 void QuicClientSession::CryptoConnect() { |
62 DCHECK(flow_controller()); | 62 DCHECK(flow_controller()); |
63 crypto_stream_->CryptoConnect(); | 63 crypto_stream_->CryptoConnect(); |
64 } | 64 } |
65 | 65 |
66 int QuicClientSession::GetNumSentClientHellos() const { | 66 int QuicClientSession::GetNumSentClientHellos() const { |
67 return crypto_stream_->num_sent_client_hellos(); | 67 return crypto_stream_->num_sent_client_hellos(); |
68 } | 68 } |
69 | 69 |
70 QuicDataStream* QuicClientSession::CreateIncomingDataStream( | 70 QuicDataStream* QuicClientSession::CreateIncomingDynamicStream( |
71 QuicStreamId id) { | 71 QuicStreamId id) { |
72 DLOG(ERROR) << "Server push not supported"; | 72 DLOG(ERROR) << "Server push not supported"; |
73 return nullptr; | 73 return nullptr; |
74 } | 74 } |
75 | 75 |
76 } // namespace tools | 76 } // namespace tools |
77 } // namespace net | 77 } // namespace net |
OLD | NEW |