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.h" | 5 #include "net/tools/quic/quic_server_session.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/quic/reliable_quic_stream.h" | 8 #include "net/quic/reliable_quic_stream.h" |
9 #include "net/tools/quic/quic_spdy_server_stream.h" | 9 #include "net/tools/quic/quic_spdy_server_stream.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 namespace tools { | 12 namespace tools { |
13 | 13 |
14 QuicServerSession::QuicServerSession( | 14 QuicServerSession::QuicServerSession( |
15 const QuicConfig& config, | 15 const QuicConfig& config, |
16 QuicConnection* connection, | 16 QuicConnection* connection, |
17 QuicSessionOwner* owner) | 17 QuicSessionOwner* owner) |
18 : QuicSession(connection, config, true), | 18 : QuicSession(connection, config, true), |
19 owner_(owner) { | 19 owner_(owner) { |
20 } | 20 } |
21 | 21 |
22 QuicServerSession::~QuicServerSession() { | 22 QuicServerSession::~QuicServerSession() { |
23 } | 23 } |
24 | 24 |
25 void QuicServerSession::InitializeSession( | 25 void QuicServerSession::Initialize( |
26 const QuicCryptoServerConfig& crypto_config) { | 26 const QuicCryptoServerConfig& crypto_config) { |
27 crypto_stream_.reset(CreateQuicCryptoServerStream(crypto_config)); | 27 crypto_stream_.reset(CreateQuicCryptoServerStream(crypto_config)); |
28 } | 28 } |
29 | 29 |
30 QuicCryptoServerStream* QuicServerSession::CreateQuicCryptoServerStream( | 30 QuicCryptoServerStream* QuicServerSession::CreateQuicCryptoServerStream( |
31 const QuicCryptoServerConfig& crypto_config) { | 31 const QuicCryptoServerConfig& crypto_config) { |
32 return new QuicCryptoServerStream(crypto_config, this); | 32 return new QuicCryptoServerStream(crypto_config, this); |
33 } | 33 } |
34 | 34 |
35 void QuicServerSession::ConnectionClose(QuicErrorCode error, bool from_peer) { | 35 void QuicServerSession::ConnectionClose(QuicErrorCode error, bool from_peer) { |
(...skipping 29 matching lines...) Expand all Loading... |
65 DLOG(ERROR) << "Server push not yet supported"; | 65 DLOG(ERROR) << "Server push not yet supported"; |
66 return NULL; | 66 return NULL; |
67 } | 67 } |
68 | 68 |
69 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { | 69 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { |
70 return crypto_stream_.get(); | 70 return crypto_stream_.get(); |
71 } | 71 } |
72 | 72 |
73 } // namespace tools | 73 } // namespace tools |
74 } // namespace net | 74 } // namespace net |
OLD | NEW |