proxygen
|
#include <PeekingAcceptorHandshakeHelper.h>
Classes | |
class | PeekCallback |
Public Member Functions | |
PeekingAcceptorHandshakeHelper (const folly::SocketAddress &clientAddr, std::chrono::steady_clock::time_point acceptTime, TransportInfo &tinfo, const std::vector< PeekCallback * > &peekCallbacks, size_t numBytes) | |
void | start (folly::AsyncSSLSocket::UniquePtr sock, AcceptorHandshakeHelper::Callback *callback) noexceptoverride |
void | dropConnection (SSLErrorEnum reason=SSLErrorEnum::NO_ERROR) override |
void | peekSuccess (std::vector< uint8_t > peekBytes) noexceptoverride |
void | peekError (const folly::AsyncSocketException &ex) noexceptoverride |
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::SocketPeeker::Callback | |
virtual | ~Callback ()=default |
Private Member Functions | |
~PeekingAcceptorHandshakeHelper () override=default | |
Private Attributes | |
folly::AsyncSSLSocket::UniquePtr | socket_ |
AcceptorHandshakeHelper::UniquePtr | helper_ |
SocketPeeker::UniquePtr | peeker_ |
AcceptorHandshakeHelper::Callback * | callback_ |
const folly::SocketAddress & | clientAddr_ |
std::chrono::steady_clock::time_point | acceptTime_ |
TransportInfo & | tinfo_ |
const std::vector< PeekCallback * > & | peekCallbacks_ |
size_t | numBytes_ |
Additional Inherited Members | |
Public Types inherited from wangle::AcceptorHandshakeHelper | |
using | UniquePtr = std::unique_ptr< AcceptorHandshakeHelper, folly::DelayedDestruction::Destructor > |
Protected Member Functions inherited from folly::DelayedDestruction | |
~DelayedDestruction () override=default | |
DelayedDestruction () | |
Protected Member Functions inherited from folly::DelayedDestructionBase | |
DelayedDestructionBase () | |
uint32_t | getDestructorGuardCount () const |
A hanshake helper which helpes switching between SSL and other protocols, so that we can run both SSL and other protocols over the same port at the same time. The mechanism used by this is to peek the first numBytes bytes of the socket and send it to the peek helper to decide which protocol it is.
Definition at line 32 of file PeekingAcceptorHandshakeHelper.h.
|
inline |
Definition at line 55 of file PeekingAcceptorHandshakeHelper.h.
Referenced by wangle::PeekingAcceptorHandshakeManager::startHelper().
|
overrideprivatedefault |
Referenced by peekError().
|
inlineoverridevirtual |
Implements wangle::AcceptorHandshakeHelper.
Definition at line 80 of file PeekingAcceptorHandshakeHelper.h.
References helper_, and socket_.
|
inlineoverridevirtualnoexcept |
Implements wangle::SocketPeeker::Callback.
Definition at line 115 of file PeekingAcceptorHandshakeHelper.h.
References callback_, wangle::AcceptorHandshakeHelper::Callback::connectionError(), folly::none, peeker_, socket_, and ~PeekingAcceptorHandshakeHelper().
Referenced by peekSuccess().
|
inlineoverridevirtualnoexcept |
Implements wangle::SocketPeeker::Callback.
Definition at line 89 of file PeekingAcceptorHandshakeHelper.h.
References acceptTime_, callback_, clientAddr_, helper_, folly::gen::move, peekCallbacks_, peeker_, peekError(), socket_, tinfo_, and type.
|
inlineoverridevirtualnoexcept |
Implements wangle::AcceptorHandshakeHelper.
Definition at line 68 of file PeekingAcceptorHandshakeHelper.h.
References callback_, folly::gen::move, numBytes_, peeker_, and socket_.
|
private |
Definition at line 132 of file PeekingAcceptorHandshakeHelper.h.
Referenced by peekSuccess(), and wangle::PeekingAcceptorHandshakeManager::startHelper().
|
private |
Definition at line 130 of file PeekingAcceptorHandshakeHelper.h.
Referenced by peekError(), peekSuccess(), and start().
|
private |
Definition at line 131 of file PeekingAcceptorHandshakeHelper.h.
Referenced by peekSuccess(), and wangle::PeekingAcceptorHandshakeManager::startHelper().
|
private |
Definition at line 127 of file PeekingAcceptorHandshakeHelper.h.
Referenced by dropConnection(), peekSuccess(), and wangle::PeekingAcceptorHandshakeManager::startHelper().
|
private |
Definition at line 135 of file PeekingAcceptorHandshakeHelper.h.
Referenced by start(), and wangle::PeekingAcceptorHandshakeManager::startHelper().
|
private |
Definition at line 134 of file PeekingAcceptorHandshakeHelper.h.
Referenced by peekSuccess(), and wangle::PeekingAcceptorHandshakeManager::startHelper().
|
private |
Definition at line 128 of file PeekingAcceptorHandshakeHelper.h.
Referenced by peekError(), peekSuccess(), and start().
|
private |
Definition at line 126 of file PeekingAcceptorHandshakeHelper.h.
Referenced by dropConnection(), peekError(), peekSuccess(), and start().
|
private |
Definition at line 133 of file PeekingAcceptorHandshakeHelper.h.
Referenced by peekSuccess(), and wangle::PeekingAcceptorHandshakeManager::startHelper().