proxygen
|
#include <AcceptorHandshakeManager.h>
Public Member Functions | |
AcceptorHandshakeManager (Acceptor *acceptor, const folly::SocketAddress &clientAddr, std::chrono::steady_clock::time_point acceptTime, TransportInfo tinfo) | |
~AcceptorHandshakeManager () override=default | |
virtual void | start (folly::AsyncSSLSocket::UniquePtr sock) noexcept |
void | timeoutExpired () noexceptoverride |
void | describe (std::ostream &os) const override |
bool | isBusy () const override |
void | notifyPendingShutdown () override |
void | closeWhenIdle () override |
void | dropConnection () override |
void | dropConnection (SSLErrorEnum reason) |
void | dumpConnectionState (uint8_t) override |
Public Member Functions inherited from wangle::ManagedConnection | |
ManagedConnection () | |
virtual std::chrono::milliseconds | getIdleTime () const |
void | fireNotifyPendingShutdown () |
void | fireCloseWhenIdle (bool force_to_close=false) |
virtual void | resetTimeout () |
void | resetTimeoutTo (std::chrono::milliseconds) |
virtual void | scheduleTimeout (folly::HHWheelTimer::Callback *callback, std::chrono::milliseconds timeout) |
ConnectionManager * | getConnectionManager () |
Public Member Functions inherited from folly::HHWheelTimer::Callback | |
Callback ()=default | |
virtual | ~Callback () |
virtual void | callbackCanceled () noexcept |
void | cancelTimeout () |
bool | isScheduled () const |
std::chrono::milliseconds | getTimeRemaining () |
Public Member Functions inherited from folly::DelayedDestruction | |
virtual void | destroy () |
bool | getDestroyPending () const |
Public Member Functions inherited from folly::DelayedDestructionBase | |
virtual | ~DelayedDestructionBase ()=default |
Public Member Functions inherited from wangle::AcceptorHandshakeHelper::Callback | |
virtual | ~Callback ()=default |
Protected Member Functions | |
void | connectionReady (folly::AsyncTransportWrapper::UniquePtr transport, std::string nextProtocol, SecureTransportType secureTransportType, folly::Optional< SSLErrorEnum > details) noexceptoverride |
void | connectionError (folly::AsyncTransportWrapper *transport, folly::exception_wrapper ex, folly::Optional< SSLErrorEnum > details) noexceptoverride |
std::chrono::milliseconds | timeSinceAcceptMs () const |
virtual void | startHelper (folly::AsyncSSLSocket::UniquePtr sock)=0 |
void | startHandshakeTimeout () |
Protected Member Functions inherited from wangle::ManagedConnection | |
~ManagedConnection () override | |
Protected Member Functions inherited from folly::HHWheelTimer::Callback | |
virtual std::chrono::steady_clock::time_point | getCurTime () |
Protected Member Functions inherited from folly::DelayedDestruction | |
~DelayedDestruction () override=default | |
DelayedDestruction () | |
Protected Member Functions inherited from folly::DelayedDestructionBase | |
DelayedDestructionBase () | |
uint32_t | getDestructorGuardCount () const |
Protected Attributes | |
Acceptor * | acceptor_ |
folly::SocketAddress | clientAddr_ |
std::chrono::steady_clock::time_point | acceptTime_ |
TransportInfo | tinfo_ |
AcceptorHandshakeHelper::UniquePtr | helper_ |
Definition at line 70 of file AcceptorHandshakeManager.h.
|
inline |
Definition at line 73 of file AcceptorHandshakeManager.h.
References folly::pushmi::__adl::noexcept(), and wangle::AcceptorHandshakeHelper::start().
|
overridedefault |
|
inlineoverridevirtual |
Instruct the connection that it should shutdown as soon as it is safe. This is called after notifyPendingShutdown().
Implements wangle::ManagedConnection.
Definition at line 102 of file AcceptorHandshakeManager.h.
|
overrideprotectedvirtualnoexcept |
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 52 of file AcceptorHandshakeManager.cpp.
References acceptor_, destroy(), and folly::gen::move.
|
overrideprotectedvirtualnoexcept |
Called after handshake has been completed successfully.
If sslErr is set, Acceptor::updateSSLStats will be called.
Implements wangle::AcceptorHandshakeHelper::Callback.
Definition at line 29 of file AcceptorHandshakeManager.cpp.
References acceptor_, destroy(), and folly::gen::move.
|
inlineoverridevirtual |
Print a human-readable description of the connection.
os | Destination stream. |
Implements wangle::ManagedConnection.
Definition at line 92 of file AcceptorHandshakeManager.h.
|
inlineoverridevirtual |
Forcibly drop a connection.
If a request is in progress, this should cause the connection to be closed with a reset.
Implements wangle::ManagedConnection.
Definition at line 104 of file AcceptorHandshakeManager.h.
References wangle::AcceptorHandshakeHelper::dropConnection(), and wangle::NO_ERROR.
|
inline |
Definition at line 108 of file AcceptorHandshakeManager.h.
|
inlineoverridevirtual |
Dump the state of the connection to the log
Implements wangle::ManagedConnection.
Definition at line 113 of file AcceptorHandshakeManager.h.
References wangle::AcceptorHandshakeHelper::Callback::connectionError(), wangle::AcceptorHandshakeHelper::Callback::connectionReady(), and string.
|
inlineoverridevirtual |
Check whether the connection has any requests outstanding.
Implements wangle::ManagedConnection.
Definition at line 96 of file AcceptorHandshakeManager.h.
|
inlineoverridevirtual |
Notify the connection that a shutdown is pending. This method will be called at the beginning of graceful shutdown.
Implements wangle::ManagedConnection.
Definition at line 100 of file AcceptorHandshakeManager.h.
|
virtualnoexcept |
Definition at line 22 of file AcceptorHandshakeManager.cpp.
References acceptor_, and folly::gen::move.
Referenced by wangle::Acceptor::startHandshakeManager().
|
protected |
Definition at line 70 of file AcceptorHandshakeManager.cpp.
References acceptor_, wangle::Acceptor::getConnectionManager(), wangle::Acceptor::getSSLHandshakeTimeout(), and wangle::ConnectionManager::scheduleTimeout().
|
protectedpure virtual |
Implemented in wangle::PeekingAcceptorHandshakeManager.
|
inlineoverridevirtualnoexcept |
timeoutExpired() is invoked when the timeout has expired.
Implements wangle::ManagedConnection.
Definition at line 87 of file AcceptorHandshakeManager.h.
References wangle::AcceptorHandshakeHelper::dropConnection(), and wangle::TIMEOUT.
|
protected |
Definition at line 65 of file AcceptorHandshakeManager.cpp.
References acceptTime_, and now().
|
protected |
Definition at line 135 of file AcceptorHandshakeManager.h.
Referenced by startHandshakeTimeout().
|
protected |
Definition at line 137 of file AcceptorHandshakeManager.h.
Referenced by timeSinceAcceptMs().
|
protected |
Definition at line 136 of file AcceptorHandshakeManager.h.
|
protected |
Definition at line 139 of file AcceptorHandshakeManager.h.
|
protected |
Definition at line 138 of file AcceptorHandshakeManager.h.