proxygen
|
Public Member Functions | |
SSLCacheClient (EventBase *eventBase, SSL_SESSION **pSess, ClientRunner *cr) | |
~SSLCacheClient () override | |
void | start () |
void | connectSuccess () noexceptoverride |
void | connectErr (const AsyncSocketException &ex) noexceptoverride |
void | handshakeSuc (AsyncSSLSocket *sock) noexceptoverride |
void | handshakeErr (AsyncSSLSocket *sock, const AsyncSocketException &ex) noexceptoverride |
Public Member Functions inherited from folly::AsyncSocket::ConnectCallback | |
virtual | ~ConnectCallback ()=default |
Public Member Functions inherited from folly::AsyncSSLSocket::HandshakeCB | |
virtual | ~HandshakeCB ()=default |
virtual bool | handshakeVer (AsyncSSLSocket *, bool preverifyOk, X509_STORE_CTX *) noexcept |
Private Attributes | |
EventBase * | eventBase_ |
int | currReq_ |
int | serverIdx_ |
AsyncSocket * | socket_ |
AsyncSSLSocket * | sslSocket_ |
SSL_SESSION * | session_ |
SSL_SESSION ** | pSess_ |
std::shared_ptr< SSLContext > | ctx_ |
ClientRunner * | cr_ |
Definition at line 52 of file SSLCacheTest.cpp.
SSLCacheClient::SSLCacheClient | ( | EventBase * | eventBase, |
SSL_SESSION ** | pSess, | ||
ClientRunner * | cr | ||
) |
|
inlineoverride |
Definition at line 68 of file SSLCacheTest.cpp.
References folly::AsyncSocket::destroy(), folly::pushmi::__adl::noexcept(), and start.
|
overridevirtualnoexcept |
connectErr() will be invoked if the connection attempt fails.
ex | An exception describing the error that occurred. |
Implements folly::AsyncSocket::ConnectCallback.
Definition at line 237 of file SSLCacheTest.cpp.
|
overridevirtualnoexcept |
connectSuccess() will be invoked when the connection has been successfully established.
Implements folly::AsyncSocket::ConnectCallback.
Definition at line 222 of file SSLCacheTest.cpp.
References ctx_, folly::AsyncSocket::detachFd(), eventBase_, pSess_, session_, folly::AsyncSSLSocket::setSSLSession(), socket_, folly::AsyncSSLSocket::sslConn(), and sslSocket_.
|
overridevirtualnoexcept |
handshakeErr() is called if an error occurs while establishing the SSL connection.
The HandshakeCB will be uninstalled before handshakeErr() is called.
sock | SSL socket on which the handshake was initiated |
ex | An exception representing the error. |
Implements folly::AsyncSSLSocket::HandshakeCB.
Definition at line 268 of file SSLCacheTest.cpp.
|
overridevirtualnoexcept |
handshakeSuc() is called when a new SSL connection is established, i.e., after SSL_accept/connect() returns successfully.
The HandshakeCB will be uninstalled before handshakeSuc() is called.
sock | SSL socket on which the handshake was initiated |
Implements folly::AsyncSSLSocket::HandshakeCB.
Definition at line 244 of file SSLCacheTest.cpp.
References folly::AsyncSSLSocket::closeNow(), cr_, currReq_, folly::AsyncSSLSocket::getSSLSession(), folly::AsyncSSLSocket::getSSLSessionReused(), ClientRunner::hits, ClientRunner::miss, ClientRunner::num, pSess_, session_, sslSocket_, and start().
void SSLCacheClient::start | ( | ) |
Definition at line 199 of file SSLCacheTest.cpp.
References folly::AsyncSocket::connect(), currReq_, folly::AsyncSocket::destroy(), eventBase_, f_num_servers, f_servers, serverIdx_, socket_, sslSocket_, and uint16_t.
Referenced by handshakeSuc(), and ClientRunner::run().
|
private |
Definition at line 64 of file SSLCacheTest.cpp.
Referenced by handshakeSuc().
|
private |
Definition at line 63 of file SSLCacheTest.cpp.
Referenced by connectSuccess(), and SSLCacheClient().
|
private |
Definition at line 57 of file SSLCacheTest.cpp.
Referenced by handshakeSuc(), and start().
|
private |
Definition at line 56 of file SSLCacheTest.cpp.
Referenced by connectSuccess(), and start().
|
private |
Definition at line 62 of file SSLCacheTest.cpp.
Referenced by connectSuccess(), and handshakeSuc().
|
private |
Definition at line 58 of file SSLCacheTest.cpp.
Referenced by start().
|
private |
Definition at line 61 of file SSLCacheTest.cpp.
Referenced by connectSuccess(), and handshakeSuc().
|
private |
Definition at line 59 of file SSLCacheTest.cpp.
Referenced by connectSuccess(), and start().
|
private |
Definition at line 60 of file SSLCacheTest.cpp.
Referenced by connectSuccess(), handshakeSuc(), and start().