22 template <
typename SM>
38 std::unique_ptr<AsyncFizzClientT, folly::DelayedDestruction::Destructor>;
46 std::shared_ptr<const FizzClientContext> fizzContext,
47 const std::shared_ptr<ClientExtensions>& extensions =
nullptr);
56 std::shared_ptr<const FizzClientContext> fizzContext,
57 const std::shared_ptr<ClientExtensions>& extensions =
nullptr);
63 HandshakeCallback* callback,
64 std::shared_ptr<const CertificateVerifier> verifier,
67 std::chrono::milliseconds = std::chrono::milliseconds(0));
75 std::shared_ptr<const CertificateVerifier> verifier,
78 std::chrono::milliseconds totalTimeout = std::chrono::milliseconds(0),
79 std::chrono::milliseconds socketTimeout = std::chrono::milliseconds(0),
89 HandshakeCallback* callback,
91 std::chrono::milliseconds = std::chrono::milliseconds(0));
93 bool good()
const override;
96 bool error()
const override;
109 void close() override;
146 std::unique_ptr<folly::IOBuf>&& buf,
156 bool closeTransport =
true);
184 boost::variant<HandshakeCallback*, folly::AsyncSocket::ConnectCallback*>>
void closeWithReset() override
ActionMoveVisitor(AsyncFizzClientT< SM > &client)
std::shared_ptr< const FizzClientContext > fizzContext_
Buf getEarlyEkm(folly::StringPiece label, const Buf &context, uint16_t length) const
EarlyDataRejectionPolicy earlyDataRejectionPolicy_
folly::Optional< CipherSuite > getCipher() const override
void setEarlyDataRejectionPolicy(EarlyDataRejectionPolicy policy)
std::unique_ptr< X509, X509Deleter > X509UniquePtr
void transportDataAvailable() override
std::deque< AppWrite > pendingAppWrites
void connectSuccess() noexceptoverride
void connectErr(const folly::AsyncSocketException &ex) noexceptoverride
virtual void fizzHandshakeError(AsyncFizzClientT *transport, folly::exception_wrapper ex) noexcept=0
bool isReplaySafe() const override
void transportError(const folly::AsyncSocketException &ex) override
folly::AsyncTransport::ReplaySafetyCallback * replaySafetyCallback_
requires E e noexcept(noexcept(s.error(std::move(e))))
std::unique_ptr< AsyncFizzClientT, folly::DelayedDestruction::Destructor > UniquePtr
bool good() const override
AsyncFizzClientT< SM > & client_
folly::Optional< folly::AsyncSocketException > handleEarlyReject()
std::map< OptionKey, int > OptionMap
std::unique_ptr< AsyncTransportWrapper, Destructor > UniquePtr
void writeAppData(folly::AsyncTransportWrapper::WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&buf, folly::WriteFlags flags=folly::WriteFlags::NONE) override
void setReplaySafetyCallback(folly::AsyncTransport::ReplaySafetyCallback *callback) override
static Options cacheChainLength()
FizzClient< ActionMoveVisitor, SM > fizzClient_
static const folly::SocketAddress & anyAddress()
folly::Optional< boost::variant< HandshakeCallback *, folly::AsyncSocket::ConnectCallback * > > callback_
std::shared_ptr< ClientExtensions > extensions_
const Cert * getSelfCertificate() const override
void deliverAllErrors(const folly::AsyncSocketException &ex, bool closeTransport=true)
static const OptionMap emptyOptionMap
virtual void fizzHandshakeSuccess(AsyncFizzClientT *transport) noexcept=0
NetworkSocket socket(int af, int type, int protocol)
bool readable() const override
folly::Optional< EarlyDataState > earlyDataState_
std::shared_ptr< const CertificateVerifier > verifier_
void deliverHandshakeError(folly::exception_wrapper ex)
std::vector< SignatureScheme > getSupportedSigSchemes() const override
ActionMoveVisitor visitor_
bool error() const override
virtual ~HandshakeCallback()=default
Buf getEkm(folly::StringPiece label, const Buf &context, uint16_t length) const override
std::unique_ptr< folly::IOBuf > Buf
const X509 * getSelfCert() const override
folly::ssl::X509UniquePtr getPeerCert() const override
const Cert * getPeerCertificate() const override
folly::Optional< std::string > pskIdentity_
bool connecting() const override
folly::Optional< std::string > sni_
virtual void connect(HandshakeCallback *callback, std::shared_ptr< const CertificateVerifier > verifier, folly::Optional< std::string > sni, folly::Optional< std::string > pskIdentity, std::chrono::milliseconds=std::chrono::milliseconds(0))
const State & getState() const
std::string getApplicationProtocol() const noexceptoverride
AsyncFizzClientT(folly::AsyncTransportWrapper::UniquePtr socket, std::shared_ptr< const FizzClientContext > fizzContext, const std::shared_ptr< ClientExtensions > &extensions=nullptr)