proxygen
wangle::BaseClientBootstrap< P > Class Template Referenceabstract

#include <BaseClientBootstrap.h>

Public Types

using Ptr = std::unique_ptr< BaseClientBootstrap >
 

Public Member Functions

 BaseClientBootstrap ()
 
virtual ~BaseClientBootstrap ()=default
 
BaseClientBootstrap< P > * pipelineFactory (std::shared_ptr< PipelineFactory< P >> factory) noexcept
 
P * getPipeline ()
 
virtual folly::Future< P * > connect (const folly::SocketAddress &address, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))=0
 
BaseClientBootstrapsslContext (folly::SSLContextPtr sslContext)
 
BaseClientBootstrapsslSession (SSL_SESSION *sslSession)
 
BaseClientBootstrapserverName (const std::string &sni)
 
BaseClientBootstrapsslSessionEstablishedCallback (SSLSessionEstablishedCallbackUniquePtr sslSessionEstablishedCallback)
 
BaseClientBootstrapdeferSecurityNegotiation (bool deferSecurityNegotiation)
 
void setPipeline (const typename P::Ptr &pipeline)
 
virtual void makePipeline (std::shared_ptr< folly::AsyncTransportWrapper > socket)
 

Protected Attributes

std::shared_ptr< PipelineFactory< P > > pipelineFactory_
 
P::Ptr pipeline_
 
folly::SSLContextPtr sslContext_
 
SSL_SESSION * sslSession_ {nullptr}
 
std::string sni_
 
bool deferSecurityNegotiation_ {false}
 
SSLSessionEstablishedCallbackUniquePtr sslSessionEstablishedCallback_
 

Detailed Description

template<typename P = DefaultPipeline>
class wangle::BaseClientBootstrap< P >

Definition at line 43 of file BaseClientBootstrap.h.

Member Typedef Documentation

template<typename P = DefaultPipeline>
using wangle::BaseClientBootstrap< P >::Ptr = std::unique_ptr<BaseClientBootstrap>

Definition at line 45 of file BaseClientBootstrap.h.

Constructor & Destructor Documentation

template<typename P = DefaultPipeline>
wangle::BaseClientBootstrap< P >::BaseClientBootstrap ( )
inline

Definition at line 46 of file BaseClientBootstrap.h.

46 {}
template<typename P = DefaultPipeline>
virtual wangle::BaseClientBootstrap< P >::~BaseClientBootstrap ( )
virtualdefault

Member Function Documentation

template<typename P = DefaultPipeline>
virtual folly::Future<P*> wangle::BaseClientBootstrap< P >::connect ( const folly::SocketAddress address,
std::chrono::milliseconds  timeout = std::chrono::milliseconds(0) 
)
pure virtual
template<typename P = DefaultPipeline>
BaseClientBootstrap* wangle::BaseClientBootstrap< P >::deferSecurityNegotiation ( bool  deferSecurityNegotiation)
inline

Definition at line 86 of file BaseClientBootstrap.h.

86  {
88  return this;
89  }
BaseClientBootstrap * deferSecurityNegotiation(bool deferSecurityNegotiation)
template<typename P = DefaultPipeline>
P* wangle::BaseClientBootstrap< P >::getPipeline ( )
inline
template<typename P = DefaultPipeline>
virtual void wangle::BaseClientBootstrap< P >::makePipeline ( std::shared_ptr< folly::AsyncTransportWrapper socket)
inlinevirtual

Reimplemented in CustomPipelineMakerTestClient.

Definition at line 95 of file BaseClientBootstrap.h.

Referenced by wangle::ClientBootstrap< Pipeline >::ConnectCallback::connectSuccess().

96  {
97  pipeline_ = pipelineFactory_->newPipeline(socket);
98  }
std::shared_ptr< PipelineFactory< P > > pipelineFactory_
NetworkSocket socket(int af, int type, int protocol)
Definition: NetOps.cpp:412
template<typename P = DefaultPipeline>
BaseClientBootstrap<P>* wangle::BaseClientBootstrap< P >::pipelineFactory ( std::shared_ptr< PipelineFactory< P >>  factory)
inlinenoexcept

Definition at line 50 of file BaseClientBootstrap.h.

Referenced by TEST().

51  {
52  pipelineFactory_ = factory;
53  return this;
54  }
std::shared_ptr< PipelineFactory< P > > pipelineFactory_
template<typename P = DefaultPipeline>
BaseClientBootstrap* wangle::BaseClientBootstrap< P >::serverName ( const std::string sni)
inline

Definition at line 75 of file BaseClientBootstrap.h.

75  {
76  sni_ = sni;
77  return this;
78  }
StringPiece sni
template<typename P = DefaultPipeline>
void wangle::BaseClientBootstrap< P >::setPipeline ( const typename P::Ptr &  pipeline)
inline

Definition at line 91 of file BaseClientBootstrap.h.

91  {
92  pipeline_ = pipeline;
93  }
template<typename P = DefaultPipeline>
BaseClientBootstrap* wangle::BaseClientBootstrap< P >::sslContext ( folly::SSLContextPtr  sslContext)
inline

Definition at line 65 of file BaseClientBootstrap.h.

65  {
67  return this;
68  }
folly::SSLContextPtr sslContext_
BaseClientBootstrap * sslContext(folly::SSLContextPtr sslContext)
template<typename P = DefaultPipeline>
BaseClientBootstrap* wangle::BaseClientBootstrap< P >::sslSession ( SSL_SESSION *  sslSession)
inline

Definition at line 70 of file BaseClientBootstrap.h.

70  {
72  return this;
73  }
BaseClientBootstrap * sslSession(SSL_SESSION *sslSession)
template<typename P = DefaultPipeline>
BaseClientBootstrap* wangle::BaseClientBootstrap< P >::sslSessionEstablishedCallback ( SSLSessionEstablishedCallbackUniquePtr  sslSessionEstablishedCallback)
inline

Definition at line 80 of file BaseClientBootstrap.h.

81  {
83  return this;
84  }
BaseClientBootstrap * sslSessionEstablishedCallback(SSLSessionEstablishedCallbackUniquePtr sslSessionEstablishedCallback)
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
SSLSessionEstablishedCallbackUniquePtr sslSessionEstablishedCallback_

Member Data Documentation

template<typename P = DefaultPipeline>
bool wangle::BaseClientBootstrap< P >::deferSecurityNegotiation_ {false}
protected

Definition at line 106 of file BaseClientBootstrap.h.

template<typename P = DefaultPipeline>
P::Ptr wangle::BaseClientBootstrap< P >::pipeline_
protected

Definition at line 102 of file BaseClientBootstrap.h.

template<typename P = DefaultPipeline>
std::shared_ptr<PipelineFactory<P> > wangle::BaseClientBootstrap< P >::pipelineFactory_
protected

Definition at line 101 of file BaseClientBootstrap.h.

template<typename P = DefaultPipeline>
std::string wangle::BaseClientBootstrap< P >::sni_
protected

Definition at line 105 of file BaseClientBootstrap.h.

template<typename P = DefaultPipeline>
folly::SSLContextPtr wangle::BaseClientBootstrap< P >::sslContext_
protected

Definition at line 103 of file BaseClientBootstrap.h.

template<typename P = DefaultPipeline>
SSL_SESSION* wangle::BaseClientBootstrap< P >::sslSession_ {nullptr}
protected

Definition at line 104 of file BaseClientBootstrap.h.

template<typename P = DefaultPipeline>
SSLSessionEstablishedCallbackUniquePtr wangle::BaseClientBootstrap< P >::sslSessionEstablishedCallback_
protected

Definition at line 107 of file BaseClientBootstrap.h.


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