proxygen
FizzClient.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
13 #include <fizz/client/PskCache.h>
15 #include <fizz/protocol/FizzBase.h>
16 
17 namespace fizz {
18 namespace client {
19 
20 template <typename ActionMoveVisitor, typename SM = ClientStateMachine>
21 class FizzClient : public FizzBase<
22  FizzClient<ActionMoveVisitor, SM>,
23  ActionMoveVisitor,
24  SM> {
25  public:
26  using FizzBase<FizzClient<ActionMoveVisitor, SM>, ActionMoveVisitor, SM>::
27  FizzBase;
28 
29  void connect(
30  std::shared_ptr<const FizzClientContext> context,
31  std::shared_ptr<const CertificateVerifier> verifier,
34  const std::shared_ptr<ClientExtensions>& extensions = nullptr);
35 
39  void connect(
40  std::shared_ptr<const FizzClientContext> context,
42 
47  Buf getEarlyEkm(folly::StringPiece label, const Buf& context, uint16_t length)
48  const;
49 
50  private:
51  friend class FizzBase<
52  FizzClient<ActionMoveVisitor, SM>,
53  ActionMoveVisitor,
54  SM>;
55 
57 };
58 } // namespace client
59 } // namespace fizz
60 
FizzBase(const typename StateMachine::StateType &state, folly::IOBufQueue &transportReadBuf, ActionMoveVisitor &visitor, folly::DelayedDestructionBase *owner)
Definition: FizzBase.h:28
context
Definition: CMakeCache.txt:563
Buf getEarlyEkm(folly::StringPiece label, const Buf &context, uint16_t length) const
void startActions(Actions actions)
void connect(std::shared_ptr< const FizzClientContext > context, std::shared_ptr< const CertificateVerifier > verifier, folly::Optional< std::string > sni, folly::Optional< CachedPsk > cachedPsk, const std::shared_ptr< ClientExtensions > &extensions=nullptr)
std::vector< Action > Actions
Definition: Actions.h:81
Definition: Actions.h:16
Actions actions(Args &&...act)
Definition: Actions.h:86
StringPiece sni
std::unique_ptr< folly::IOBuf > Buf
Definition: Types.h:22
StringPiece label