proxygen
folly::SSLAcceptEvbRunner Class Reference

#include <AsyncSSLSocketTest.h>

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

Public Member Functions

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

Protected Attributes

EventBaseevb_
 

Detailed Description

Definition at line 1460 of file AsyncSSLSocketTest.h.

Constructor & Destructor Documentation

folly::SSLAcceptEvbRunner::SSLAcceptEvbRunner ( EventBase evb)
inlineexplicit

Definition at line 1462 of file AsyncSSLSocketTest.h.

1462 : evb_(evb) {}
folly::SSLAcceptEvbRunner::~SSLAcceptEvbRunner ( )
overridedefault

Member Function Documentation

void folly::SSLAcceptEvbRunner::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::SSLAcceptRunner.

Reimplemented in folly::SSLAcceptDestroyRunner, folly::SSLAcceptCloseRunner, and folly::SSLAcceptErrorRunner.

Definition at line 1465 of file AsyncSSLSocketTest.h.

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

1466  {
1467  evb_->runInLoop([acceptFunc = std::move(acceptFunc),
1468  finallyFunc = std::move(finallyFunc)]() mutable {
1469  finallyFunc(acceptFunc());
1470  });
1471  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void runInLoop(LoopCallback *callback, bool thisIteration=false)
Definition: EventBase.cpp:520

Member Data Documentation

EventBase* folly::SSLAcceptEvbRunner::evb_
protected

Definition at line 1474 of file AsyncSSLSocketTest.h.


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