proxygen
|
#include <AsyncFizzClient.h>
Classes | |
class | ActionMoveVisitor |
struct | EarlyDataState |
class | HandshakeCallback |
Public Types | |
using | UniquePtr = std::unique_ptr< AsyncFizzClientT, folly::DelayedDestruction::Destructor > |
Public Types inherited from fizz::AsyncFizzBase | |
using | UniquePtr = std::unique_ptr< AsyncFizzBase, folly::DelayedDestruction::Destructor > |
using | ReadCallback = folly::AsyncTransportWrapper::ReadCallback |
Public Types inherited from folly::AsyncTransportWrapper | |
using | UniquePtr = std::unique_ptr< AsyncTransportWrapper, Destructor > |
using | ReadCallback = AsyncReader::ReadCallback |
using | WriteCallback = AsyncWriter::WriteCallback |
Public Types inherited from folly::AsyncTransport | |
typedef std::unique_ptr< AsyncTransport, Destructor > | UniquePtr |
Public Member Functions | |
AsyncFizzClientT (folly::AsyncTransportWrapper::UniquePtr socket, std::shared_ptr< const FizzClientContext > fizzContext, const std::shared_ptr< ClientExtensions > &extensions=nullptr) | |
AsyncFizzClientT (folly::EventBase *eventBase, std::shared_ptr< const FizzClientContext > fizzContext, const std::shared_ptr< ClientExtensions > &extensions=nullptr) | |
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)) |
virtual void | connect (const folly::SocketAddress &connectAddr, folly::AsyncSocket::ConnectCallback *callback, std::shared_ptr< const CertificateVerifier > verifier, folly::Optional< std::string > sni, folly::Optional< std::string > pskIdentity, std::chrono::milliseconds totalTimeout=std::chrono::milliseconds(0), std::chrono::milliseconds socketTimeout=std::chrono::milliseconds(0), const folly::AsyncSocket::OptionMap &options=folly::AsyncSocket::emptyOptionMap, const folly::SocketAddress &bindAddr=folly::AsyncSocket::anyAddress()) |
virtual void | connect (HandshakeCallback *callback, folly::Optional< std::string > hostname, std::chrono::milliseconds=std::chrono::milliseconds(0)) |
bool | good () const override |
bool | readable () const override |
bool | connecting () const override |
bool | error () const override |
folly::ssl::X509UniquePtr | getPeerCert () const override |
const X509 * | getSelfCert () const override |
const Cert * | getPeerCertificate () const override |
const Cert * | getSelfCertificate () const override |
bool | isReplaySafe () const override |
void | setReplaySafetyCallback (folly::AsyncTransport::ReplaySafetyCallback *callback) override |
std::string | getApplicationProtocol () const noexceptoverride |
void | close () override |
void | closeWithReset () override |
void | closeNow () override |
void | setEarlyDataRejectionPolicy (EarlyDataRejectionPolicy policy) |
const State & | getState () const |
folly::Optional< CipherSuite > | getCipher () const override |
std::vector< SignatureScheme > | getSupportedSigSchemes () const override |
Buf | getEkm (folly::StringPiece label, const Buf &context, uint16_t length) const override |
Buf | getEarlyEkm (folly::StringPiece label, const Buf &context, uint16_t length) const |
bool | pskResumed () const |
Public Member Functions inherited from fizz::AsyncFizzBase | |
AsyncFizzBase (folly::AsyncTransportWrapper::UniquePtr transport) | |
~AsyncFizzBase () override | |
ReadCallback * | getReadCallback () const override |
void | setReadCB (ReadCallback *callback) override |
void | writeChain (folly::AsyncTransportWrapper::WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&buf, folly::WriteFlags flags=folly::WriteFlags::NONE) override |
size_t | getAppBytesWritten () const override |
size_t | getAppBytesReceived () const override |
void | destroy () override |
std::string | getSecurityProtocol () const override |
void | attachTimeoutManager (folly::TimeoutManager *manager) |
void | detachTimeoutManager () |
void | attachEventBase (folly::EventBase *eventBase) override |
void | detachEventBase () override |
bool | isDetachable () const override |
Public Member Functions inherited from folly::WriteChainAsyncTransportWrapper< folly::AsyncTransportWrapper > | |
void | write (folly::AsyncTransportWrapper::WriteCallback *callback, const void *buf, size_t bytes, folly::WriteFlags flags=folly::WriteFlags::NONE) override |
void | writev (folly::AsyncTransportWrapper::WriteCallback *callback, const iovec *vec, size_t count, folly::WriteFlags flags=folly::WriteFlags::NONE) override |
Public Member Functions inherited from folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper > | |
DecoratedAsyncTransportWrapper (typename folly::AsyncTransportWrapper::UniquePtr transport) | |
const AsyncTransportWrapper * | getWrappedTransport () const override |
ReadCallback * | getReadCallback () const override |
void | setReadCB (folly::AsyncTransportWrapper::ReadCallback *callback) override |
folly::EventBase * | getEventBase () const override |
void | attachEventBase (folly::EventBase *eventBase) override |
void | close () override |
void | closeNow () override |
void | closeWithReset () override |
bool | connecting () const override |
void | detachEventBase () override |
bool | error () const override |
size_t | getAppBytesReceived () const override |
size_t | getAppBytesWritten () const override |
void | getLocalAddress (folly::SocketAddress *address) const override |
void | getPeerAddress (folly::SocketAddress *address) const override |
folly::ssl::X509UniquePtr | getPeerCert () const override |
size_t | getRawBytesReceived () const override |
size_t | getRawBytesWritten () const override |
uint32_t | getSendTimeout () const override |
bool | good () const override |
bool | isDetachable () const override |
bool | isEorTrackingEnabled () const override |
bool | readable () const override |
bool | writable () const override |
void | setEorTracking (bool track) override |
void | setSendTimeout (uint32_t timeoutInMs) override |
void | shutdownWrite () override |
void | shutdownWriteNow () override |
std::string | getApplicationProtocol () const noexceptoverride |
std::string | getSecurityProtocol () const override |
bool | isReplaySafe () const override |
void | setReplaySafetyCallback (folly::AsyncTransport::ReplaySafetyCallback *callback) override |
const AsyncTransportCertificate * | getPeerCertificate () const override |
const AsyncTransportCertificate * | getSelfCertificate () const override |
Public Member Functions inherited from folly::AsyncTransportWrapper | |
template<class T > | |
const T * | getUnderlyingTransport () const |
template<class T > | |
T * | getUnderlyingTransport () |
Public Member Functions inherited from folly::AsyncTransport | |
virtual bool | isPending () const |
SocketAddress | getLocalAddress () const |
void | getAddress (SocketAddress *address) const override |
SocketAddress | getPeerAddress () const |
Public Member Functions inherited from folly::DelayedDestruction | |
bool | getDestroyPending () const |
Public Member Functions inherited from folly::DelayedDestructionBase | |
virtual | ~DelayedDestructionBase ()=default |
Public Member Functions inherited from folly::AsyncSocketBase | |
virtual | ~AsyncSocketBase ()=default |
Protected Member Functions | |
void | writeAppData (folly::AsyncTransportWrapper::WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&buf, folly::WriteFlags flags=folly::WriteFlags::NONE) override |
void | transportError (const folly::AsyncSocketException &ex) override |
void | transportDataAvailable () override |
Protected Member Functions inherited from fizz::AsyncFizzBase | |
virtual void | startTransportReads () |
virtual void | startHandshakeTimeout (std::chrono::milliseconds) |
virtual void | cancelHandshakeTimeout () |
virtual void | deliverAppData (std::unique_ptr< folly::IOBuf > buf) |
virtual void | deliverError (const folly::AsyncSocketException &ex, bool closeTransport=true) |
Protected Member Functions inherited from folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper > | |
~DecoratedAsyncTransportWrapper () override | |
Protected Member Functions inherited from folly::AsyncTransport | |
~AsyncTransport () override=default | |
Protected Member Functions inherited from folly::DelayedDestruction | |
~DelayedDestruction () override=default | |
DelayedDestruction () | |
Protected Member Functions inherited from folly::DelayedDestructionBase | |
DelayedDestructionBase () | |
uint32_t | getDestructorGuardCount () const |
Protected Member Functions inherited from folly::AsyncReader | |
virtual | ~AsyncReader ()=default |
Protected Member Functions inherited from folly::AsyncWriter | |
virtual | ~AsyncWriter ()=default |
Protected Member Functions inherited from folly::AsyncWriter::WriteCallback | |
virtual | ~WriteCallback ()=default |
Private Member Functions | |
void | deliverAllErrors (const folly::AsyncSocketException &ex, bool closeTransport=true) |
void | deliverHandshakeError (folly::exception_wrapper ex) |
void | connectErr (const folly::AsyncSocketException &ex) noexceptoverride |
void | connectSuccess () noexceptoverride |
folly::Optional< folly::AsyncSocketException > | handleEarlyReject () |
Private Member Functions inherited from folly::AsyncSocket::ConnectCallback | |
virtual | ~ConnectCallback ()=default |
Private Attributes | |
folly::Optional< boost::variant< HandshakeCallback *, folly::AsyncSocket::ConnectCallback * > > | callback_ |
std::shared_ptr< const FizzClientContext > | fizzContext_ |
std::shared_ptr< ClientExtensions > | extensions_ |
folly::Optional< std::string > | sni_ |
folly::Optional< std::string > | pskIdentity_ |
State | state_ |
ActionMoveVisitor | visitor_ |
FizzClient< ActionMoveVisitor, SM > | fizzClient_ |
folly::Optional< EarlyDataState > | earlyDataState_ |
EarlyDataRejectionPolicy | earlyDataRejectionPolicy_ |
folly::AsyncTransport::ReplaySafetyCallback * | replaySafetyCallback_ {nullptr} |
std::shared_ptr< const CertificateVerifier > | verifier_ |
Additional Inherited Members | |
Protected Attributes inherited from fizz::AsyncFizzBase | |
folly::IOBufQueue | transportReadBuf_ {folly::IOBufQueue::cacheChainLength()} |
Protected Attributes inherited from folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper > | |
folly::AsyncTransportWrapper::UniquePtr | transport_ |
Definition at line 23 of file AsyncFizzClient.h.
using fizz::client::AsyncFizzClientT< SM >::UniquePtr = std::unique_ptr<AsyncFizzClientT, folly::DelayedDestruction::Destructor> |
Definition at line 38 of file AsyncFizzClient.h.
fizz::client::AsyncFizzClientT< SM >::AsyncFizzClientT | ( | folly::AsyncTransportWrapper::UniquePtr | socket, |
std::shared_ptr< const FizzClientContext > | fizzContext, | ||
const std::shared_ptr< ClientExtensions > & | extensions = nullptr |
||
) |
Creates an AsyncFizzClient using an open socket. Connections are made using connect() APIs taking a HandshakeCallback.
Definition at line 13 of file AsyncFizzClient-inl.h.
fizz::client::AsyncFizzClientT< SM >::AsyncFizzClientT | ( | folly::EventBase * | eventBase, |
std::shared_ptr< const FizzClientContext > | fizzContext, | ||
const std::shared_ptr< ClientExtensions > & | extensions = nullptr |
||
) |
Creates an AsyncFizzClient using an event base. This will open the socket for you when you call the connec() API taking a SocketAddress and ConnectCallback.
Definition at line 24 of file AsyncFizzClient-inl.h.
|
overridevirtual |
Close the transport.
This gracefully closes the transport, waiting for all pending write requests to complete before actually closing the underlying transport.
If a read callback is set, readEOF() will be called immediately. If there are outstanding write requests, the close will be delayed until all remaining writes have completed. No new writes may be started after close() has been called.
Implements folly::AsyncTransport.
Definition at line 216 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::deliverAllErrors(), folly::AsyncSocketException::END_OF_FILE, fizz::client::AsyncFizzClientT< SM >::fizzClient_, and folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >::transport_.
|
overridevirtual |
Close the transport immediately.
This closes the transport immediately, dropping any outstanding data waiting to be written.
If a read callback is set, readEOF() will be called immediately. If there are outstanding write requests, these requests will be aborted and writeError() will be invoked immediately on all outstanding write callbacks.
Implements folly::AsyncTransport.
Definition at line 241 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::deliverAllErrors(), folly::AsyncSocketException::END_OF_FILE, fizz::client::AsyncFizzClientT< SM >::fizzClient_, and folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >::transport_.
|
overridevirtual |
Reset the transport immediately.
This closes the transport immediately, sending a reset to the remote peer if possible to indicate abnormal shutdown.
Note that not all subclasses implement this reset functionality: some subclasses may treat reset() the same as closeNow(). Subclasses that use TCP transports should terminate the connection with a TCP reset.
Reimplemented from folly::AsyncTransport.
Definition at line 229 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::deliverAllErrors(), folly::AsyncSocketException::END_OF_FILE, fizz::client::AsyncFizzClientT< SM >::fizzClient_, and folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >::transport_.
|
virtual |
Performs a TLS handshake using the open socket passed into the constructor.
Definition at line 50 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::callback_, fizz::client::AsyncFizzClientT< SM >::deliverAllErrors(), fizz::client::AsyncFizzClientT< SM >::extensions_, fizz::client::AsyncFizzClientT< SM >::fizzClient_, fizz::client::AsyncFizzClientT< SM >::fizzContext_, folly::gen::move, folly::none, folly::AsyncSocketException::NOT_OPEN, fizz::client::AsyncFizzClientT< SM >::pskIdentity_, sni, fizz::client::AsyncFizzClientT< SM >::sni_, fizz::AsyncFizzBase::startHandshakeTimeout(), fizz::AsyncFizzBase::startTransportReads(), and folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >::transport_.
Referenced by fizz::client::AsyncFizzClientT< SM >::connect().
|
virtual |
Opens a socket to the given address and performs a TLS handshake.
Definition at line 92 of file AsyncFizzClient-inl.h.
References folly::AsyncSocketException::BAD_ARGS, fizz::client::AsyncFizzClientT< SM >::callback_, fizz::client::AsyncFizzClientT< SM >::deliverAllErrors(), folly::AsyncSocket::disableTransparentTls(), folly::gen::move, fizz::client::AsyncFizzClientT< SM >::pskIdentity_, sni, fizz::client::AsyncFizzClientT< SM >::sni_, fizz::AsyncFizzBase::startHandshakeTimeout(), folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >::transport_, and fizz::client::AsyncFizzClientT< SM >::verifier_.
|
virtual |
Variant of the TLS handshake connect() API above that uses the default certificate verifier implementation.
Definition at line 36 of file AsyncFizzClient-inl.h.
References fizz::Client, fizz::client::AsyncFizzClientT< SM >::connect(), and folly::gen::move.
|
overrideprivatevirtualnoexcept |
connectErr() will be invoked if the connection attempt fails.
ex | An exception describing the error that occurred. |
Implements folly::AsyncSocket::ConnectCallback.
Definition at line 269 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::deliverAllErrors().
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
overridevirtual |
Determine if transport is connected to the endpoint
Implements fizz::AsyncFizzBase.
Definition at line 145 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::callback_, and folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >::transport_.
|
overrideprivatevirtualnoexcept |
connectSuccess() will be invoked when the connection has been successfully established.
Implements folly::AsyncSocket::ConnectCallback.
Definition at line 253 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::extensions_, fizz::client::AsyncFizzClientT< SM >::fizzClient_, fizz::client::AsyncFizzClientT< SM >::fizzContext_, folly::gen::move, folly::none, fizz::client::AsyncFizzClientT< SM >::pskIdentity_, fizz::client::AsyncFizzClientT< SM >::sni_, fizz::AsyncFizzBase::startTransportReads(), and fizz::client::AsyncFizzClientT< SM >::verifier_.
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
private |
Definition at line 344 of file AsyncFizzClient-inl.h.
References fizz::AsyncFizzBase::deliverError(), fizz::client::AsyncFizzClientT< SM >::deliverHandshakeError(), fizz::client::AsyncFizzClientT< SM >::earlyDataState_, fizz::client::AsyncFizzClientT< SM >::fizzClient_, folly::gen::move, and fizz::client::AsyncFizzClientT< SM >::replaySafetyCallback_.
Referenced by fizz::client::AsyncFizzClientT< SM >::close(), fizz::client::AsyncFizzClientT< SM >::closeNow(), fizz::client::AsyncFizzClientT< SM >::closeWithReset(), fizz::client::AsyncFizzClientT< SM >::connect(), fizz::client::AsyncFizzClientT< SM >::connectErr(), fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState(), and fizz::client::AsyncFizzClientT< SM >::transportError().
|
private |
Definition at line 366 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::callback_, fizz::AsyncFizzBase::cancelHandshakeTimeout(), fizz::client::AsyncFizzClientT< SM >::HandshakeCallback::fizzHandshakeError(), folly::exception_wrapper::handle(), folly::gen::move, folly::none, folly::AsyncSocketException::SSL_ERROR, and folly::variant_match().
Referenced by fizz::client::AsyncFizzClientT< SM >::deliverAllErrors(), and fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
overridevirtual |
Determine if an error has occurred with this transport.
Implements fizz::AsyncFizzBase.
Definition at line 150 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::fizzClient_, and folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >::transport_.
Referenced by fizz::client::AsyncFizzClientT< SM >::good(), and fizz::client::AsyncFizzClientT< SM >::writeAppData().
|
overridevirtualnoexcept |
Return the application protocol being used by the underlying transport protocol. This is useful for transports which are used to tunnel other protocols.
Implements fizz::AsyncFizzBase.
Definition at line 199 of file AsyncFizzClient-inl.h.
References alpn, fizz::client::State::alpn(), fizz::client::State::earlyDataParams(), fizz::client::AsyncFizzClientT< SM >::earlyDataState_, and fizz::client::AsyncFizzClientT< SM >::getState().
|
overridevirtual |
Get the CipherSuite negotiated in this transport.
Implements fizz::AsyncFizzBase.
Definition at line 548 of file AsyncFizzClient-inl.h.
References fizz::client::State::cipher(), and fizz::client::AsyncFizzClientT< SM >::getState().
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
Buf fizz::client::AsyncFizzClientT< SM >::getEarlyEkm | ( | folly::StringPiece | label, |
const Buf & | context, | ||
uint16_t | length | ||
) | const |
Definition at line 567 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::fizzClient_.
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
overridevirtual |
Get the exported material.
Implements fizz::AsyncFizzBase.
Definition at line 559 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::fizzClient_.
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
overridevirtual |
Information about the current security state. To be implemented by derived classes.
Implements fizz::AsyncFizzBase.
Definition at line 155 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::getPeerCertificate(), and serverCert.
|
overridevirtual |
Get the certificates in fizz::Cert form.
Implements fizz::AsyncFizzBase.
Definition at line 175 of file AsyncFizzClient-inl.h.
References fizz::client::State::earlyDataParams(), fizz::client::AsyncFizzClientT< SM >::earlyDataState_, fizz::client::AsyncFizzClientT< SM >::getState(), and fizz::client::State::serverCert().
Referenced by fizz::client::AsyncFizzClientT< SM >::getPeerCert().
|
overridevirtual |
The local certificate used for this connection. May be null
Implements fizz::AsyncFizzBase.
Definition at line 165 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::getSelfCertificate().
|
overridevirtual |
Get the certificate information of this transport, if any
Implements fizz::AsyncFizzBase.
Definition at line 181 of file AsyncFizzClient-inl.h.
References fizz::client::State::clientCert(), fizz::client::State::earlyDataParams(), fizz::client::AsyncFizzClientT< SM >::earlyDataState_, and fizz::client::AsyncFizzClientT< SM >::getState().
Referenced by fizz::client::AsyncFizzClientT< SM >::getSelfCert().
|
inline |
Internal state access for logging/testing.
Definition at line 127 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::getApplicationProtocol(), fizz::client::AsyncFizzClientT< SM >::getCipher(), fizz::client::AsyncFizzClientT< SM >::getPeerCertificate(), fizz::client::AsyncFizzClientT< SM >::getSelfCertificate(), fizz::client::AsyncFizzClientT< SM >::getSupportedSigSchemes(), fizz::client::AsyncFizzClientT< SM >::handleEarlyReject(), and fizz::client::AsyncFizzClientT< SM >::pskResumed().
|
overridevirtual |
Get the supported signature schemes in this transport.
Implements fizz::AsyncFizzBase.
Definition at line 553 of file AsyncFizzClient-inl.h.
References fizz::client::State::context(), fizz::client::AsyncFizzClientT< SM >::getState(), and fizz::client::FizzClientContext::getSupportedSigSchemes().
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
overridevirtual |
Information about the current transport state. To be implemented by derived classes.
Implements fizz::AsyncFizzBase.
Definition at line 135 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::error(), and folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >::transport_.
|
private |
Definition at line 431 of file AsyncFizzClient-inl.h.
References fizz::client::AutomaticResend, fizz::AppWrite::data, folly::AsyncSocketException::EARLY_DATA_REJECTED, fizz::client::AsyncFizzClientT< SM >::earlyDataRejectionPolicy_, fizz::client::AsyncFizzClientT< SM >::earlyDataState_, fizz::client::earlyParametersMatch(), fizz::client::FatalConnectionError, fizz::client::AsyncFizzClientT< SM >::fizzClient_, fizz::client::AsyncFizzClientT< SM >::getState(), folly::gen::move, and folly::none.
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
overridevirtual |
False if the transport does not have replay protection, but will in the future.
Implements fizz::AsyncFizzBase.
Definition at line 187 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::earlyDataState_.
Referenced by fizz::client::AsyncFizzClientT< SM >::setReplaySafetyCallback().
bool fizz::client::AsyncFizzClientT< SM >::pskResumed | ( | ) | const |
Definition at line 575 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::getState(), folly::Optional< Value >::has_value(), and fizz::client::State::pskMode().
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
overridevirtual |
Determine if the transport is readable or not.
Implements fizz::AsyncFizzBase.
Definition at line 140 of file AsyncFizzClient-inl.h.
References folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >::transport_.
|
inline |
Set the policy for dealing with rejected early data.
Note that early data must be also be enabled on the FizzClientContext for early data to be used.
Definition at line 119 of file AsyncFizzClient.h.
|
overridevirtual |
Set the ReplaySafeCallback on this transport.
This should only be called if isReplaySafe() returns false.
Implements fizz::AsyncFizzBase.
Definition at line 192 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::isReplaySafe(), and fizz::client::AsyncFizzClientT< SM >::replaySafetyCallback_.
|
overrideprotectedvirtual |
Alert the derived class that additional data is available in transportReadBuf_.
Implements fizz::AsyncFizzBase.
Definition at line 339 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::fizzClient_.
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
overrideprotectedvirtual |
Alert the derived class that a transport error occured.
Implements fizz::AsyncFizzBase.
Definition at line 332 of file AsyncFizzClient-inl.h.
References fizz::client::AsyncFizzClientT< SM >::deliverAllErrors().
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
overrideprotectedvirtual |
Interface for the derived class to implement to receive app data from the app layer.
Implements fizz::AsyncFizzBase.
Definition at line 275 of file AsyncFizzClient-inl.h.
References fizz::client::AutomaticResend, fizz::EarlyAppWrite::callback, fizz::AppWrite::callback, fizz::EarlyAppWrite::data, fizz::AppWrite::data, fizz::client::AsyncFizzClientT< SM >::earlyDataRejectionPolicy_, fizz::client::AsyncFizzClientT< SM >::earlyDataState_, fizz::client::AsyncFizzClientT< SM >::error(), fizz::client::AsyncFizzClientT< SM >::fizzClient_, fizz::EarlyAppWrite::flags, fizz::AppWrite::flags, folly::AsyncSocketException::INVALID_STATE, folly::gen::move, folly::size(), and folly::AsyncWriter::WriteCallback::writeErr().
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
private |
Definition at line 185 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::connect(), fizz::client::AsyncFizzClientT< SM >::connecting(), and fizz::client::AsyncFizzClientT< SM >::deliverHandshakeError().
|
private |
Definition at line 217 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::handleEarlyReject(), fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::setEarlyDataRejectionPolicy(), and fizz::client::AsyncFizzClientT< SM >::writeAppData().
|
private |
Definition at line 215 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::deliverAllErrors(), fizz::client::AsyncFizzClientT< SM >::getApplicationProtocol(), fizz::client::AsyncFizzClientT< SM >::getPeerCertificate(), fizz::client::AsyncFizzClientT< SM >::getSelfCertificate(), fizz::client::AsyncFizzClientT< SM >::handleEarlyReject(), fizz::client::AsyncFizzClientT< SM >::isReplaySafe(), fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::setEarlyDataRejectionPolicy(), and fizz::client::AsyncFizzClientT< SM >::writeAppData().
|
private |
Definition at line 189 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::connect(), and fizz::client::AsyncFizzClientT< SM >::connectSuccess().
|
private |
Definition at line 199 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::close(), fizz::client::AsyncFizzClientT< SM >::closeNow(), fizz::client::AsyncFizzClientT< SM >::closeWithReset(), fizz::client::AsyncFizzClientT< SM >::connect(), fizz::client::AsyncFizzClientT< SM >::connectSuccess(), fizz::client::AsyncFizzClientT< SM >::deliverAllErrors(), fizz::client::AsyncFizzClientT< SM >::error(), fizz::client::AsyncFizzClientT< SM >::getEarlyEkm(), fizz::client::AsyncFizzClientT< SM >::getEkm(), fizz::client::AsyncFizzClientT< SM >::handleEarlyReject(), fizz::client::AsyncFizzClientT< SM >::transportDataAvailable(), and fizz::client::AsyncFizzClientT< SM >::writeAppData().
|
private |
Definition at line 187 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::connect(), and fizz::client::AsyncFizzClientT< SM >::connectSuccess().
|
private |
Definition at line 193 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::connect(), and fizz::client::AsyncFizzClientT< SM >::connectSuccess().
|
private |
Definition at line 220 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::deliverAllErrors(), and fizz::client::AsyncFizzClientT< SM >::setReplaySafetyCallback().
|
private |
Definition at line 191 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::connect(), and fizz::client::AsyncFizzClientT< SM >::connectSuccess().
|
private |
Definition at line 195 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< fizz::client::test::MockClientStateMachineInstance >::getState().
|
private |
Definition at line 223 of file AsyncFizzClient.h.
Referenced by fizz::client::AsyncFizzClientT< SM >::connect(), and fizz::client::AsyncFizzClientT< SM >::connectSuccess().
|
private |
Definition at line 197 of file AsyncFizzClient.h.