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
3 // found in the LICENSE file.
4 
5 #ifndef QUICHE_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_
6 #define QUICHE_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_
7 
8 #include "quiche/quic/core/crypto/quic_random.h"
9 #include "quiche/quic/core/quic_crypto_server_stream_base.h"
10 
11 namespace quic {
12 
13 // Simple helper for server crypto streams which generates a new random
14 // connection ID for rejects.
15 class QuicSimpleCryptoServerStreamHelper
16     : public QuicCryptoServerStreamBase::Helper {
17  public:
18   QuicSimpleCryptoServerStreamHelper();
19 
20   ~QuicSimpleCryptoServerStreamHelper() override;
21 
22   bool CanAcceptClientHello(const CryptoHandshakeMessage& message,
23                             const QuicSocketAddress& client_address,
24                             const QuicSocketAddress& peer_address,
25                             const QuicSocketAddress& self_address,
26                             std::string* error_details) const override;
27 };
28 
29 }  // namespace quic
30 
31 #endif  // QUICHE_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_
32