proxygen
folly::SSLAcceptDestroyRunner Class Reference

#include <AsyncSSLSocketTest.h>

Inheritance diagram for folly::SSLAcceptDestroyRunner:
folly::SSLAcceptEvbRunner folly::SSLAcceptRunner

Public Member Functions

 SSLAcceptDestroyRunner (EventBase *evb, SSLHandshakeBase *base)
 
 ~SSLAcceptDestroyRunner () override=default
 
void run (Function< int()> acceptFunc, Function< void(int)> finallyFunc) const override
 
- Public Member Functions inherited from folly::SSLAcceptEvbRunner
 SSLAcceptEvbRunner (EventBase *evb)
 
 ~SSLAcceptEvbRunner () override=default
 
- Public Member Functions inherited from folly::SSLAcceptRunner
virtual ~SSLAcceptRunner ()=default
 

Private Attributes

SSLHandshakeBasesslBase_
 

Additional Inherited Members

- Protected Attributes inherited from folly::SSLAcceptEvbRunner
EventBaseevb_
 

Detailed Description

Definition at line 1510 of file AsyncSSLSocketTest.h.

Constructor & Destructor Documentation

folly::SSLAcceptDestroyRunner::SSLAcceptDestroyRunner ( EventBase evb,
SSLHandshakeBase base 
)
inlineexplicit

Definition at line 1512 of file AsyncSSLSocketTest.h.

1513  : SSLAcceptEvbRunner(evb), sslBase_(base) {}
folly::SSLAcceptDestroyRunner::~SSLAcceptDestroyRunner ( )
overridedefault

Member Function Documentation

void folly::SSLAcceptDestroyRunner::run ( Function< int()>  acceptFunc,
Function< void(int)>  finallyFunc 
) const
inlineoverridevirtual

This is expected to run the first function and provide its return value to the second function. This can be used to run the SSL_accept in different contexts.

Reimplemented from folly::SSLAcceptEvbRunner.

Definition at line 1516 of file AsyncSSLSocketTest.h.

References evb_, and folly::gen::move.

1517  {
1518  evb_->runInLoop([acceptFunc = std::move(acceptFunc),
1519  finallyFunc = std::move(finallyFunc),
1520  sslBase = sslBase_]() mutable {
1521  auto ret = acceptFunc();
1522  std::move(*sslBase).moveSocket();
1523  finallyFunc(ret);
1524  });
1525  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void runInLoop(LoopCallback *callback, bool thisIteration=false)
Definition: EventBase.cpp:520

Member Data Documentation

SSLHandshakeBase* folly::SSLAcceptDestroyRunner::sslBase_
private

Definition at line 1528 of file AsyncSSLSocketTest.h.


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