proxygen
Cb Class Reference
Inheritance diagram for Cb:
folly::AsyncSocket::ConnectCallback

Public Member Functions

 Cb (folly::AsyncSSLSocket *sock)
 
void connectSuccess () noexceptoverride
 
void connectErr (const folly::AsyncSocketException &) noexceptoverride
 
const X509 * getPeerCert ()
 
- Public Member Functions inherited from folly::AsyncSocket::ConnectCallback
virtual ~ConnectCallback ()=default
 

Public Attributes

bool success {false}
 
bool reusedSession {false}
 
wangle::SSLSessionPtr session
 
folly::AsyncSSLSocketsock_ {nullptr}
 
folly::ssl::X509UniquePtr peerCert_ {nullptr}
 

Detailed Description

Definition at line 127 of file HTTPServerTest.cpp.

Constructor & Destructor Documentation

Cb::Cb ( folly::AsyncSSLSocket sock)
inlineexplicit

Definition at line 129 of file HTTPServerTest.cpp.

129 : sock_(sock) {}
folly::AsyncSSLSocket * sock_

Member Function Documentation

void Cb::connectErr ( const folly::AsyncSocketException ex)
inlineoverridevirtualnoexcept

connectErr() will be invoked if the connection attempt fails.

Parameters
exAn exception describing the error that occurred.

Implements folly::AsyncSocket::ConnectCallback.

Definition at line 141 of file HTTPServerTest.cpp.

References folly::detail::success.

141  {
142  success = false;
143  }
bool success
void Cb::connectSuccess ( )
inlineoverridevirtualnoexcept

connectSuccess() will be invoked when the connection has been successfully established.

Implements folly::AsyncSocket::ConnectCallback.

Definition at line 130 of file HTTPServerTest.cpp.

References sock_, and folly::detail::success.

130  {
131  success = true;
133  session.reset(sock_->getSSLSession());
134  if (sock_->getPeerCert()) {
135  // keeps this alive until Cb is destroyed, even if sock is closed
137  }
138  sock_->close();
139  }
wangle::SSLSessionPtr session
folly::ssl::X509UniquePtr peerCert_
folly::AsyncSSLSocket * sock_
ssl::X509UniquePtr getPeerCert() const override
bool success
bool reusedSession
virtual bool getSSLSessionReused() const
SSL_SESSION * getSSLSession()
void close() override
const X509* Cb::getPeerCert ( )
inline

Definition at line 145 of file HTTPServerTest.cpp.

145 { return peerCert_.get(); }
folly::ssl::X509UniquePtr peerCert_

Member Data Documentation

Definition at line 151 of file HTTPServerTest.cpp.

bool Cb::reusedSession {false}

Definition at line 148 of file HTTPServerTest.cpp.

wangle::SSLSessionPtr Cb::session

Definition at line 149 of file HTTPServerTest.cpp.

Definition at line 150 of file HTTPServerTest.cpp.

bool Cb::success {false}

Definition at line 147 of file HTTPServerTest.cpp.


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