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 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_HELPER_H_ | 5 #ifndef NET_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_ |
6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_HELPER_H_ | 6 #define NET_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_ |
7 | 7 |
8 #include "net/quic/core/crypto/quic_random.h" | 8 #include "net/quic/core/crypto/quic_random.h" |
9 #include "net/quic/core/quic_server_session_base.h" | 9 #include "net/quic/core/quic_crypto_server_stream.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 // Simple helper for server sessions which generates a new random | 13 // Simple helper for server crypto streams which generates a new random |
14 // connection ID for stateless rejects. | 14 // connection ID for stateless rejects. |
15 class QuicSimpleServerSessionHelper : public QuicServerSessionBase::Helper { | 15 class QuicSimpleCryptoServerStreamHelper |
| 16 : public QuicCryptoServerStream::Helper { |
16 public: | 17 public: |
17 explicit QuicSimpleServerSessionHelper(QuicRandom* random); | 18 explicit QuicSimpleCryptoServerStreamHelper(QuicRandom* random); |
18 | 19 |
19 ~QuicSimpleServerSessionHelper() override; | 20 ~QuicSimpleCryptoServerStreamHelper() override; |
20 | 21 |
21 QuicConnectionId GenerateConnectionIdForReject( | 22 QuicConnectionId GenerateConnectionIdForReject( |
22 QuicConnectionId /*connection_id*/) const override; | 23 QuicConnectionId /*connection_id*/) const override; |
23 | 24 |
24 bool CanAcceptClientHello(const CryptoHandshakeMessage& message, | 25 bool CanAcceptClientHello(const CryptoHandshakeMessage& message, |
25 const IPEndPoint& self_address, | 26 const IPEndPoint& self_address, |
26 std::string* error_details) const override; | 27 std::string* error_details) const override; |
27 | 28 |
28 private: | 29 private: |
29 QuicRandom* random_; // Unowned. | 30 QuicRandom* random_; // Unowned. |
30 }; | 31 }; |
31 | 32 |
32 } // namespace net | 33 } // namespace net |
33 | 34 |
34 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_HELPER_H_ | 35 #endif // NET_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_ |
OLD | NEW |