| 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_QUIC_QUIC_SERVER_SESSION_BASE_H_ | 7 #ifndef NET_QUIC_QUIC_SERVER_SESSION_BASE_H_ |
| 8 #define NET_QUIC_QUIC_SERVER_SESSION_BASE_H_ | 8 #define NET_QUIC_QUIC_SERVER_SESSION_BASE_H_ |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 QuicConnectionId connection_id) const = 0; | 67 QuicConnectionId connection_id) const = 0; |
| 68 | 68 |
| 69 // Returns true if |message|, which was received on |self_address| is | 69 // Returns true if |message|, which was received on |self_address| is |
| 70 // acceptable according to the visitor's policy. Otherwise, returns false | 70 // acceptable according to the visitor's policy. Otherwise, returns false |
| 71 // and populates |error_details|. | 71 // and populates |error_details|. |
| 72 virtual bool CanAcceptClientHello(const CryptoHandshakeMessage& message, | 72 virtual bool CanAcceptClientHello(const CryptoHandshakeMessage& message, |
| 73 const IPEndPoint& self_address, | 73 const IPEndPoint& self_address, |
| 74 std::string* error_details) const = 0; | 74 std::string* error_details) const = 0; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 // |crypto_config| must outlive the session. | 77 // Does not take ownership of |connection|. |crypto_config| must outlive the |
| 78 // session. |
| 78 QuicServerSessionBase(const QuicConfig& config, | 79 QuicServerSessionBase(const QuicConfig& config, |
| 79 QuicConnection* connection, | 80 QuicConnection* connection, |
| 80 Visitor* visitor, | 81 Visitor* visitor, |
| 81 Helper* helper, | 82 Helper* helper, |
| 82 const QuicCryptoServerConfig* crypto_config, | 83 const QuicCryptoServerConfig* crypto_config, |
| 83 QuicCompressedCertsCache* compressed_certs_cache); | 84 QuicCompressedCertsCache* compressed_certs_cache); |
| 84 | 85 |
| 85 // Override the base class to notify the owner of the connection close. | 86 // Override the base class to notify the owner of the connection close. |
| 86 void OnConnectionClosed(QuicErrorCode error, | 87 void OnConnectionClosed(QuicErrorCode error, |
| 87 const std::string& error_details, | 88 const std::string& error_details, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // Set during handshake. If true, resources in x-associated-content and link | 181 // Set during handshake. If true, resources in x-associated-content and link |
| 181 // headers will be pushed. see: go/gfe_server_push. | 182 // headers will be pushed. see: go/gfe_server_push. |
| 182 bool server_push_enabled_; | 183 bool server_push_enabled_; |
| 183 | 184 |
| 184 DISALLOW_COPY_AND_ASSIGN(QuicServerSessionBase); | 185 DISALLOW_COPY_AND_ASSIGN(QuicServerSessionBase); |
| 185 }; | 186 }; |
| 186 | 187 |
| 187 } // namespace net | 188 } // namespace net |
| 188 | 189 |
| 189 #endif // NET_QUIC_QUIC_SERVER_SESSION_BASE_H_ | 190 #endif // NET_QUIC_QUIC_SERVER_SESSION_BASE_H_ |
| OLD | NEW |