proxygen
|
#include <EvbHandshakeHelper.h>
Protected Types | |
enum | HandshakeState : unsigned { HandshakeState::Invalid, HandshakeState::Started, HandshakeState::Dropped, HandshakeState::Callback } |
Protected Member Functions | |
~EvbHandshakeHelper () | |
Protected Member Functions inherited from folly::DelayedDestruction | |
~DelayedDestruction () override=default | |
DelayedDestruction () | |
Protected Member Functions inherited from folly::DelayedDestructionBase | |
DelayedDestructionBase () | |
uint32_t | getDestructorGuardCount () const |
Private Member Functions | |
std::pair< bool, HandshakeState > | tryTransition (HandshakeState expected, HandshakeState next) |
Additional Inherited Members | |
Public Types inherited from wangle::AcceptorHandshakeHelper | |
using | UniquePtr = std::unique_ptr< AcceptorHandshakeHelper, folly::DelayedDestruction::Destructor > |
Wraps an existing AcceptorHandshakeHelper and callback. Performs handshakes under a specified handshake eventbase and delivers callback notifications in the original EventBase.
An example use case of this class would be to offload TLS handshakes under a separate EventBase thread rather than the Acceptor thread.
Definition at line 34 of file EvbHandshakeHelper.h.
|
strongprotected |
|
inlineexplicit |
Definition at line 37 of file EvbHandshakeHelper.h.
References connectionError(), connectionReady(), dropConnection(), wangle::NO_ERROR, folly::pushmi::__adl::noexcept(), start(), and string.
|
protected |
Definition at line 166 of file EvbHandshakeHelper.cpp.
|
overridevirtualnoexcept |
Called if an error was encountered while performing handshake.
If sslErr is set, Acceptor::updateSSLStats will be called.
Implements wangle::AcceptorHandshakeHelper::Callback.
Definition at line 126 of file EvbHandshakeHelper.cpp.
References Callback, callback_, folly::Optional< Value >::clear(), wangle::AcceptorHandshakeHelper::Callback::connectionError(), dropConnectionGuard_, handshakeEvb_, folly::Optional< Value >::hasValue(), helper_, folly::gen::move, originalEvb_, folly::EventBase::runInEventBaseThread(), Started, and tryTransition().
Referenced by EvbHandshakeHelper().
|
overridevirtualnoexcept |
Called after handshake has been completed successfully.
If sslErr is set, Acceptor::updateSSLStats will be called.
Implements wangle::AcceptorHandshakeHelper::Callback.
Definition at line 81 of file EvbHandshakeHelper.cpp.
References Callback, callback_, folly::Optional< Value >::clear(), wangle::AcceptorHandshakeHelper::Callback::connectionReady(), dropConnectionGuard_, handshakeEvb_, folly::Optional< Value >::hasValue(), folly::gen::move, originalEvb_, folly::EventBase::runInEventBaseThread(), Started, and tryTransition().
Referenced by EvbHandshakeHelper().
|
overridevirtual |
Implements wangle::AcceptorHandshakeHelper.
Definition at line 42 of file EvbHandshakeHelper.cpp.
References callback_, folly::Optional< Value >::clear(), wangle::AcceptorHandshakeHelper::Callback::connectionError(), folly::EventBase::dcheckIsInEventBaseThread(), dropConnectionGuard_, Dropped, folly::Optional< Value >::emplace(), handshakeEvb_, helper_, originalEvb_, folly::EventBase::runInEventBaseThread(), Started, and tryTransition().
Referenced by EvbHandshakeHelper().
|
overridevirtualnoexcept |
Implements wangle::AcceptorHandshakeHelper.
Definition at line 20 of file EvbHandshakeHelper.cpp.
References callback_, testing::internal::Invalid(), and folly::gen::move.
Referenced by EvbHandshakeHelper().
|
private |
Definition at line 159 of file EvbHandshakeHelper.cpp.
References state_.
Referenced by connectionError(), connectionReady(), and dropConnection().
|
protected |
Definition at line 73 of file EvbHandshakeHelper.h.
Referenced by connectionError(), connectionReady(), and dropConnection().
|
protected |
Definition at line 210 of file EvbHandshakeHelper.h.
Referenced by connectionError(), connectionReady(), and dropConnection().
|
protected |
Definition at line 76 of file EvbHandshakeHelper.h.
Referenced by connectionError(), connectionReady(), and dropConnection().
|
protected |
Definition at line 72 of file EvbHandshakeHelper.h.
Referenced by connectionError(), and dropConnection().
|
protected |
Definition at line 75 of file EvbHandshakeHelper.h.
Referenced by connectionError(), connectionReady(), and dropConnection().
|
protected |
Definition at line 204 of file EvbHandshakeHelper.h.
Referenced by tryTransition().