proxygen
folly::ConnectTimeoutCallback Class Reference

#include <AsyncSSLSocketTest.h>

Inheritance diagram for folly::ConnectTimeoutCallback:
folly::SSLServerAcceptCallbackBase folly::AsyncServerSocket::AcceptCallback

Public Member Functions

 ConnectTimeoutCallback ()
 
void connAccepted (const std::shared_ptr< folly::AsyncSSLSocket > &s) noexceptoverride
 
- 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::SSLServerAcceptCallbackBase
StateEnum state
 
HandshakeCallbackhcb_
 
std::shared_ptr< SSLContextctx_
 
std::shared_ptr< AsyncSSLSocketsocket_
 
EventBasebase_
 

Detailed Description

Definition at line 695 of file AsyncSSLSocketTest.h.

Constructor & Destructor Documentation

folly::ConnectTimeoutCallback::ConnectTimeoutCallback ( )
inline

Definition at line 697 of file AsyncSSLSocketTest.h.

References folly::STATE_SUCCEEDED.

697  : SSLServerAcceptCallbackBase(nullptr) {
698  // We don't care if we get invoked or not.
699  // The client may time out and give up before connAccepted() is even
700  // called.
702  }
SSLServerAcceptCallbackBase(HandshakeCallback *hcb)
Definition: TestSSLServer.h:51
state
Definition: http_parser.c:272

Member Function Documentation

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

Implements folly::SSLServerAcceptCallbackBase.

Definition at line 704 of file AsyncSSLSocketTest.h.

References s.

705  {
706  std::cerr << "ConnectTimeoutCallback::connAccepted" << std::endl;
707 
708  // Just wait a while before closing the socket, so the client
709  // will time out waiting for the handshake to complete.
710  s->getEventBase()->tryRunAfterDelay([=] { s->close(); }, 100);
711  }
static set< string > s

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