| 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 // A server specific QuicSession subclass. | 5 // A server specific QuicSession subclass. |
| 6 | 6 |
| 7 #ifndef NET_TOOLS_QUIC_QUIC_SERVER_SESSION_BASE_H_ | 7 #ifndef NET_TOOLS_QUIC_QUIC_SERVER_SESSION_BASE_H_ |
| 8 #define NET_TOOLS_QUIC_QUIC_SERVER_SESSION_BASE_H_ | 8 #define NET_TOOLS_QUIC_QUIC_SERVER_SESSION_BASE_H_ |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // established yet or number of server initiated streams already reaches the | 95 // established yet or number of server initiated streams already reaches the |
| 96 // upper limit. | 96 // upper limit. |
| 97 virtual bool ShouldCreateOutgoingDynamicStream(); | 97 virtual bool ShouldCreateOutgoingDynamicStream(); |
| 98 | 98 |
| 99 // If we should create an incoming stream, returns true. Otherwise | 99 // If we should create an incoming stream, returns true. Otherwise |
| 100 // does error handling, including communicating the error to the client and | 100 // does error handling, including communicating the error to the client and |
| 101 // possibly closing the connection, and returns false. | 101 // possibly closing the connection, and returns false. |
| 102 virtual bool ShouldCreateIncomingDynamicStream(QuicStreamId id); | 102 virtual bool ShouldCreateIncomingDynamicStream(QuicStreamId id); |
| 103 | 103 |
| 104 virtual QuicCryptoServerStreamBase* CreateQuicCryptoServerStream( | 104 virtual QuicCryptoServerStreamBase* CreateQuicCryptoServerStream( |
| 105 const QuicCryptoServerConfig* crypto_config) = 0; | 105 const QuicCryptoServerConfig* crypto_config, |
| 106 QuicCompressedCertsCache* compressed_certs_cache) = 0; |
| 106 | 107 |
| 107 const QuicCryptoServerConfig* crypto_config() { return crypto_config_; } | 108 const QuicCryptoServerConfig* crypto_config() { return crypto_config_; } |
| 108 | 109 |
| 109 private: | 110 private: |
| 110 friend class test::QuicServerSessionBasePeer; | 111 friend class test::QuicServerSessionBasePeer; |
| 111 friend class test::QuicSimpleServerSessionPeer; | 112 friend class test::QuicSimpleServerSessionPeer; |
| 112 | 113 |
| 113 const QuicCryptoServerConfig* crypto_config_; | 114 const QuicCryptoServerConfig* crypto_config_; |
| 114 | 115 |
| 115 // The cache which contains most recently compressed certs. | 116 // The cache which contains most recently compressed certs. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 134 | 135 |
| 135 // Number of packets sent to the peer, at the time we last sent a SCUP. | 136 // Number of packets sent to the peer, at the time we last sent a SCUP. |
| 136 int64_t last_scup_packet_number_; | 137 int64_t last_scup_packet_number_; |
| 137 | 138 |
| 138 DISALLOW_COPY_AND_ASSIGN(QuicServerSessionBase); | 139 DISALLOW_COPY_AND_ASSIGN(QuicServerSessionBase); |
| 139 }; | 140 }; |
| 140 | 141 |
| 141 } // namespace net | 142 } // namespace net |
| 142 | 143 |
| 143 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_BASE_H_ | 144 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_BASE_H_ |
| OLD | NEW |