proxygen
wangle::SecurityProtocolContextManager Class Reference

#include <SecurityProtocolContextManager.h>

Public Member Functions

void addPeeker (PeekingCallbackPtr peekingCallback)
 
AcceptorHandshakeManagergetHandshakeManager (Acceptor *acceptor, const folly::SocketAddress &clientAddr, std::chrono::steady_clock::time_point acceptTime, TransportInfo &tinfo) noexcept
 
size_t getPeekBytes () const
 

Private Attributes

std::vector< PeekingCallbackPtrpeekingCallbacks_
 
size_t numBytes_ {0}
 

Detailed Description

This class holds different peekers that will be used to get the appropriate AcceptorHandshakeHelper to handle the security protocol negotiation.

Definition at line 26 of file SecurityProtocolContextManager.h.

Member Function Documentation

void wangle::SecurityProtocolContextManager::addPeeker ( PeekingCallbackPtr  peekingCallback)
inline

Adds a peeker to be used when accepting connections on a secure port. Peekers will be used in the order they are added.

Definition at line 32 of file SecurityProtocolContextManager.h.

References wangle::PeekingAcceptorHandshakeHelper::PeekCallback::getBytesRequired(), folly::gen::move, numBytes_, and peekingCallbacks_.

Referenced by wangle::Acceptor::init().

32  {
33  if (peekingCallback->getBytesRequired() > numBytes_) {
34  numBytes_ = peekingCallback->getBytesRequired();
35  }
36  peekingCallbacks_.push_back(std::move(peekingCallback));
37  }
std::vector< PeekingCallbackPtr > peekingCallbacks_
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
AcceptorHandshakeManager* wangle::SecurityProtocolContextManager::getHandshakeManager ( Acceptor acceptor,
const folly::SocketAddress clientAddr,
std::chrono::steady_clock::time_point  acceptTime,
TransportInfo tinfo 
)
inlinenoexcept

Definition at line 39 of file SecurityProtocolContextManager.h.

References numBytes_, and peekingCallbacks_.

Referenced by wangle::Acceptor::startHandshakeManager().

43  {
44  return new PeekingAcceptorHandshakeManager(
45  acceptor, clientAddr, acceptTime, tinfo, peekingCallbacks_, numBytes_);
46  }
std::vector< PeekingCallbackPtr > peekingCallbacks_
size_t wangle::SecurityProtocolContextManager::getPeekBytes ( ) const
inline

Definition at line 48 of file SecurityProtocolContextManager.h.

References numBytes_.

Member Data Documentation

size_t wangle::SecurityProtocolContextManager::numBytes_ {0}
private

Highest number of bytes required by a peeking callback.

Definition at line 61 of file SecurityProtocolContextManager.h.

Referenced by addPeeker(), getHandshakeManager(), and getPeekBytes().

std::vector<PeekingCallbackPtr> wangle::SecurityProtocolContextManager::peekingCallbacks_
private

Peeking callbacks for each handshake protocol.

Definition at line 56 of file SecurityProtocolContextManager.h.

Referenced by addPeeker(), and getHandshakeManager().


The documentation for this class was generated from the following file: