36 std::unique_ptr<SSLSessionEstablishedCallback>;
42 template <
typename P = DefaultPipeline>
45 using Ptr = std::unique_ptr<BaseClientBootstrap>;
52 pipelineFactory_ = factory;
57 return pipeline_.get();
62 std::chrono::milliseconds
timeout =
63 std::chrono::milliseconds(0)) = 0;
66 sslContext_ = sslContext;
71 sslSession_ = sslSession;
82 sslSessionEstablishedCallback_ =
std::move(sslSessionEstablishedCallback);
87 deferSecurityNegotiation_ = deferSecurityNegotiation;
96 std::shared_ptr<folly::AsyncTransportWrapper>
socket) {
97 pipeline_ = pipelineFactory_->newPipeline(socket);
104 SSL_SESSION* sslSession_{
nullptr};
106 bool deferSecurityNegotiation_{
false};
110 template <
typename ClientBootstrap = BaseClientBootstrap<>>
std::unique_ptr< SSLSessionEstablishedCallback > SSLSessionEstablishedCallbackUniquePtr
int connect(NetworkSocket s, const sockaddr *name, socklen_t namelen)
BaseClientBootstrap * sslSessionEstablishedCallback(SSLSessionEstablishedCallbackUniquePtr sslSessionEstablishedCallback)
constexpr detail::Map< Move > move
virtual void onEstablished(SSL_SESSION *session)=0
requires E e noexcept(noexcept(s.error(std::move(e))))
BaseClientBootstrap * deferSecurityNegotiation(bool deferSecurityNegotiation)
folly::SSLContextPtr sslContext_
BaseClientBootstrap * serverName(const std::string &sni)
Optional< std::string > sni_
std::shared_ptr< SSLContext > SSLContextPtr
BaseClientBootstrap * sslContext(folly::SSLContextPtr sslContext)
std::shared_ptr< PipelineFactory< P > > pipelineFactory_
BaseClientBootstrap< P > * pipelineFactory(std::shared_ptr< PipelineFactory< P >> factory) noexcept
NetworkSocket socket(int af, int type, int protocol)
BaseClientBootstrap * sslSession(SSL_SESSION *sslSession)
virtual void makePipeline(std::shared_ptr< folly::AsyncTransportWrapper > socket)
virtual ~SSLSessionEstablishedCallback()=default
std::unique_ptr< BaseClientBootstrap > Ptr
SSLSessionEstablishedCallbackUniquePtr sslSessionEstablishedCallback_
void setPipeline(const typename P::Ptr &pipeline)