| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/quic_server_session.h" | 5 #include "net/quic/quic_server_session.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/quic/quic_connection.h" | 8 #include "net/quic/quic_connection.h" |
| 9 #include "net/quic/quic_flags.h" | 9 #include "net/quic/quic_flags.h" |
| 10 #include "net/quic/quic_spdy_server_stream.h" | 10 #include "net/quic/quic_spdy_server_stream.h" |
| 11 #include "net/quic/reliable_quic_stream.h" | 11 #include "net/quic/reliable_quic_stream.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 QuicServerSession::QuicServerSession( | 15 QuicServerSession::QuicServerSession( |
| 16 const QuicConfig& config, | 16 const QuicConfig& config, |
| 17 QuicConnection* connection, | 17 QuicConnection* connection, |
| 18 QuicPerConnectionPacketWriter* connection_packet_writer, | 18 QuicPerConnectionPacketWriter* connection_packet_writer, |
| 19 QuicServerSessionVisitor* visitor) | 19 QuicServerSessionVisitor* visitor) |
| 20 : QuicSession(connection, config), | 20 : QuicSession(connection, config), |
| 21 connection_packet_writer_(connection_packet_writer), | 21 connection_packet_writer_(connection_packet_writer), |
| 22 visitor_(visitor) {} | 22 visitor_(visitor) {} |
| 23 | 23 |
| 24 QuicServerSession::~QuicServerSession() {} | 24 QuicServerSession::~QuicServerSession() {} |
| 25 | 25 |
| 26 void QuicServerSession::InitializeSession( | 26 void QuicServerSession::InitializeSession( |
| 27 const QuicCryptoServerConfig& crypto_config) { | 27 const QuicCryptoServerConfig& crypto_config) { |
| 28 QuicSession::InitializeSession(); |
| 28 crypto_stream_.reset(CreateQuicCryptoServerStream(crypto_config)); | 29 crypto_stream_.reset(CreateQuicCryptoServerStream(crypto_config)); |
| 29 } | 30 } |
| 30 | 31 |
| 31 QuicCryptoServerStream* QuicServerSession::CreateQuicCryptoServerStream( | 32 QuicCryptoServerStream* QuicServerSession::CreateQuicCryptoServerStream( |
| 32 const QuicCryptoServerConfig& crypto_config) { | 33 const QuicCryptoServerConfig& crypto_config) { |
| 33 return new QuicCryptoServerStream(crypto_config, this); | 34 return new QuicCryptoServerStream(crypto_config, this); |
| 34 } | 35 } |
| 35 | 36 |
| 36 void QuicServerSession::OnConfigNegotiated() { | 37 void QuicServerSession::OnConfigNegotiated() { |
| 37 QuicSession::OnConfigNegotiated(); | 38 QuicSession::OnConfigNegotiated(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() { | 89 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() { |
| 89 DLOG(ERROR) << "Server push not yet supported"; | 90 DLOG(ERROR) << "Server push not yet supported"; |
| 90 return NULL; | 91 return NULL; |
| 91 } | 92 } |
| 92 | 93 |
| 93 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { | 94 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { |
| 94 return crypto_stream_.get(); | 95 return crypto_stream_.get(); |
| 95 } | 96 } |
| 96 | 97 |
| 97 } // namespace net | 98 } // namespace net |
| OLD | NEW |