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 const QuicCryptoServerConfig& crypto_config, | 16 const QuicCryptoServerConfig& crypto_config, |
17 QuicConnection* connection, | 17 QuicConnection* connection, |
18 QuicSessionOwner* owner) | 18 QuicSessionOwner* owner) |
19 : QuicSession(connection, true), | 19 : QuicSession(connection, config, true), |
20 crypto_stream_(config, crypto_config, this), | 20 crypto_stream_(crypto_config, this), |
21 owner_(owner) { | 21 owner_(owner) { |
| 22 set_max_open_streams(config.max_streams_per_connection()); |
22 } | 23 } |
23 | 24 |
24 QuicServerSession::~QuicServerSession() { | 25 QuicServerSession::~QuicServerSession() { |
25 } | 26 } |
26 | 27 |
27 void QuicServerSession::ConnectionClose(QuicErrorCode error, bool from_peer) { | 28 void QuicServerSession::ConnectionClose(QuicErrorCode error, bool from_peer) { |
28 QuicSession::ConnectionClose(error, from_peer); | 29 QuicSession::ConnectionClose(error, from_peer); |
29 owner_->OnConnectionClose(connection()->guid(), error); | 30 owner_->OnConnectionClose(connection()->guid(), error); |
30 } | 31 } |
31 | 32 |
(...skipping 25 matching lines...) Expand all Loading... |
57 DLOG(ERROR) << "Server push not yet supported"; | 58 DLOG(ERROR) << "Server push not yet supported"; |
58 return NULL; | 59 return NULL; |
59 } | 60 } |
60 | 61 |
61 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { | 62 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { |
62 return &crypto_stream_; | 63 return &crypto_stream_; |
63 } | 64 } |
64 | 65 |
65 } // namespace tools | 66 } // namespace tools |
66 } // namespace net | 67 } // namespace net |
OLD | NEW |