proxygen
folly::EvbAndContext Struct Reference

Public Member Functions

 EvbAndContext ()
 
std::shared_ptr< AsyncSSLSocketcreateSocket ()
 
EventBasegetEventBase ()
 
void attach (AsyncSSLSocket &socket)
 

Public Attributes

folly::ScopedEventBaseThread evb_
 
std::shared_ptr< SSLContextctx_
 

Detailed Description

Definition at line 37 of file AsyncSSLSocketTest2.cpp.

Constructor & Destructor Documentation

folly::EvbAndContext::EvbAndContext ( )
inline

Definition at line 38 of file AsyncSSLSocketTest2.cpp.

References ctx_.

38  {
39  ctx_.reset(new SSLContext());
40  ctx_->setOptions(SSL_OP_NO_TICKET);
41  ctx_->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
42  }
std::shared_ptr< SSLContext > ctx_

Member Function Documentation

void folly::EvbAndContext::attach ( AsyncSSLSocket socket)
inline

Definition at line 52 of file AsyncSSLSocketTest2.cpp.

References folly::AsyncSSLSocket::attachEventBase(), ctx_, and getEventBase().

Referenced by folly::AttachDetachClient::connect(), and folly::AttachDetachClient::connectSuccess().

52  {
53  socket.attachEventBase(getEventBase());
54  socket.attachSSLContext(ctx_);
55  }
std::shared_ptr< SSLContext > ctx_
NetworkSocket socket(int af, int type, int protocol)
Definition: NetOps.cpp:412
std::shared_ptr<AsyncSSLSocket> folly::EvbAndContext::createSocket ( )
inline

Definition at line 44 of file AsyncSSLSocketTest2.cpp.

References ctx_, getEventBase(), and folly::AsyncSSLSocket::newSocket().

Referenced by folly::AttachDetachClient::connect().

44  {
46  }
std::shared_ptr< SSLContext > ctx_
static std::shared_ptr< AsyncSSLSocket > newSocket(const std::shared_ptr< folly::SSLContext > &ctx, EventBase *evb, int fd, bool server=true, bool deferSecurityNegotiation=false)
EventBase* folly::EvbAndContext::getEventBase ( )
inline

Member Data Documentation

std::shared_ptr<SSLContext> folly::EvbAndContext::ctx_
folly::ScopedEventBaseThread folly::EvbAndContext::evb_

Definition at line 57 of file AsyncSSLSocketTest2.cpp.

Referenced by getEventBase().


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