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_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_HELPER_H_ |
6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_HELPER_H_ | 6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_HELPER_H_ |
7 | 7 |
8 #include "net/quic/crypto/quic_random.h" | 8 #include "net/quic/core/crypto/quic_random.h" |
9 #include "net/quic/quic_server_session_base.h" | 9 #include "net/quic/core/quic_server_session_base.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 sessions 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 QuicSimpleServerSessionHelper : public QuicServerSessionBase::Helper { |
16 public: | 16 public: |
17 explicit QuicSimpleServerSessionHelper(QuicRandom* random); | 17 explicit QuicSimpleServerSessionHelper(QuicRandom* random); |
18 | 18 |
19 ~QuicSimpleServerSessionHelper() override; | 19 ~QuicSimpleServerSessionHelper() override; |
20 | 20 |
21 QuicConnectionId GenerateConnectionIdForReject( | 21 QuicConnectionId GenerateConnectionIdForReject( |
22 QuicConnectionId /*connection_id*/) const override; | 22 QuicConnectionId /*connection_id*/) const override; |
23 | 23 |
24 bool CanAcceptClientHello(const CryptoHandshakeMessage& message, | 24 bool CanAcceptClientHello(const CryptoHandshakeMessage& message, |
25 const IPEndPoint& self_address, | 25 const IPEndPoint& self_address, |
26 std::string* error_details) const override; | 26 std::string* error_details) const override; |
27 | 27 |
28 private: | 28 private: |
29 QuicRandom* random_; // Unowned. | 29 QuicRandom* random_; // Unowned. |
30 }; | 30 }; |
31 | 31 |
32 } // namespace net | 32 } // namespace net |
33 | 33 |
34 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_HELPER_H_ | 34 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_HELPER_H_ |
OLD | NEW |