proxygen
folly::SSLServerAsyncCacheAcceptCallback Class Reference

#include <AsyncSSLSocketTest.h>

Inheritance diagram for folly::SSLServerAsyncCacheAcceptCallback:
folly::SSLServerAcceptCallback folly::SSLServerAcceptCallbackBase folly::AsyncServerSocket::AcceptCallback

Public Member Functions

 SSLServerAsyncCacheAcceptCallback (HandshakeCallback *hcb, uint32_t timeout=0)
 
void connAccepted (const std::shared_ptr< folly::AsyncSSLSocket > &s) noexceptoverride
 
- Public Member Functions inherited from folly::SSLServerAcceptCallback
 SSLServerAcceptCallback (HandshakeCallback *hcb, uint32_t timeout=0)
 
 ~SSLServerAcceptCallback () override
 
- Public Member Functions inherited from folly::SSLServerAcceptCallbackBase
 SSLServerAcceptCallbackBase (HandshakeCallback *hcb)
 
 ~SSLServerAcceptCallbackBase () override
 
void acceptError (const std::exception &ex) noexceptoverride
 
void connectionAccepted (int fd, const SocketAddress &) noexceptoverride
 
void detach ()
 
- Public Member Functions inherited from folly::AsyncServerSocket::AcceptCallback
virtual ~AcceptCallback ()=default
 
virtual void acceptStarted () noexcept
 
virtual void acceptStopped () noexcept
 

Additional Inherited Members

- Public Attributes inherited from folly::SSLServerAcceptCallback
uint32_t timeout_
 
- Public Attributes inherited from folly::SSLServerAcceptCallbackBase
StateEnum state
 
HandshakeCallbackhcb_
 
std::shared_ptr< SSLContextctx_
 
std::shared_ptr< AsyncSSLSocketsocket_
 
EventBasebase_
 

Detailed Description

Definition at line 612 of file AsyncSSLSocketTest.h.

Constructor & Destructor Documentation

folly::SSLServerAsyncCacheAcceptCallback::SSLServerAsyncCacheAcceptCallback ( HandshakeCallback hcb,
uint32_t  timeout = 0 
)
inlineexplicit

Definition at line 614 of file AsyncSSLSocketTest.h.

References folly::detail::timeout.

617  : SSLServerAcceptCallback(hcb, timeout) {}
SSLServerAcceptCallback(HandshakeCallback *hcb, uint32_t timeout=0)

Member Function Documentation

void folly::SSLServerAsyncCacheAcceptCallback::connAccepted ( const std::shared_ptr< folly::AsyncSSLSocket > &  s)
inlineoverridevirtualnoexcept

Reimplemented from folly::SSLServerAcceptCallback.

Definition at line 619 of file AsyncSSLSocketTest.h.

References ASSERT_TRUE, s, folly::AsyncSSLSocket::sslAccept(), folly::AsyncSSLSocket::STATE_ACCEPTING, folly::AsyncSSLSocket::STATE_CACHE_LOOKUP, and folly::STATE_SUCCEEDED.

620  {
621  auto sock = std::static_pointer_cast<AsyncSSLSocket>(s);
622 
623  std::cerr << "SSLServerAcceptCallback::connAccepted" << std::endl;
624 
625  hcb_->setSocket(sock);
626  sock->sslAccept(hcb_, std::chrono::milliseconds(timeout_));
627  ASSERT_TRUE(
628  (sock->getSSLState() == AsyncSSLSocket::STATE_ACCEPTING) ||
629  (sock->getSSLState() == AsyncSSLSocket::STATE_CACHE_LOOKUP));
630 
632  }
void setSocket(const std::shared_ptr< AsyncSSLSocket > &socket)
static set< string > s
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
state
Definition: http_parser.c:272

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