proxygen
|
#include <AsyncSSLSocketTest.h>
Public Member Functions | |
AlpnServer (AsyncSSLSocket::UniquePtr socket) | |
Public Attributes | |
const unsigned char * | nextProto |
unsigned | nextProtoLength |
folly::Optional< AsyncSocketException > | except |
Private Member Functions | |
void | handshakeSuc (AsyncSSLSocket *) noexceptoverride |
void | handshakeErr (AsyncSSLSocket *, const AsyncSocketException &ex) noexceptoverride |
void | getReadBuffer (void **, size_t *lenReturn) override |
void | readDataAvailable (size_t) noexceptoverride |
void | readEOF () noexceptoverride |
void | readErr (const AsyncSocketException &ex) noexceptoverride |
![]() | |
virtual | ~HandshakeCB ()=default |
virtual bool | handshakeVer (AsyncSSLSocket *, bool preverifyOk, X509_STORE_CTX *) noexcept |
![]() | |
virtual | ~ReadCallback ()=default |
virtual bool | isBufferMovable () noexcept |
virtual size_t | maxBufferSize () const |
virtual void | readBufferAvailable (std::unique_ptr< IOBuf >) noexcept |
Private Attributes | |
AsyncSSLSocket::UniquePtr | socket_ |
Definition at line 951 of file AsyncSSLSocketTest.h.
|
inlineexplicit |
Definition at line 954 of file AsyncSSLSocketTest.h.
References folly::SendMsgParamsCallbackBase::socket_.
|
inlineoverrideprivatevirtual |
When data becomes available, getReadBuffer() will be invoked to get the buffer into which data should be read.
This method allows the ReadCallback to delay buffer allocation until data becomes available. This allows applications to manage large numbers of idle connections, without having to maintain a separate read buffer for each idle connection.
It is possible that in some cases, getReadBuffer() may be called multiple times before readDataAvailable() is invoked. In this case, the data will be written to the buffer returned from the most recent call to readDataAvailable(). If the previous calls to readDataAvailable() returned different buffers, the ReadCallback is responsible for ensuring that they are not leaked.
If getReadBuffer() throws an exception, returns a nullptr buffer, or returns a 0 length, the ReadCallback will be uninstalled and its readError() method will be invoked.
getReadBuffer() is not allowed to change the transport state before it returns. (For example, it should never uninstall the read callback, or set a different read callback.)
bufReturn | getReadBuffer() should update *bufReturn to contain the address of the read buffer. This parameter will never be nullptr. |
lenReturn | getReadBuffer() should update *lenReturn to contain the maximum number of bytes that may be written to the read buffer. This parameter will never be nullptr. |
Implements folly::AsyncReader::ReadCallback.
Definition at line 972 of file AsyncSSLSocketTest.h.
|
inlineoverrideprivatevirtualnoexcept |
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 967 of file AsyncSSLSocketTest.h.
|
inlineoverrideprivatevirtualnoexcept |
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 964 of file AsyncSSLSocketTest.h.
References folly::SendMsgParamsCallbackBase::socket_.
|
inlineoverrideprivatevirtualnoexcept |
readDataAvailable() will be invoked when data has been successfully read into the buffer returned by the last call to getReadBuffer().
The read callback remains installed after readDataAvailable() returns. It must be explicitly uninstalled to stop receiving read events. getReadBuffer() will be called at least once before each call to readDataAvailable(). getReadBuffer() will also be called before any call to readEOF().
len | The number of bytes placed in the buffer. |
Implements folly::AsyncReader::ReadCallback.
Definition at line 975 of file AsyncSSLSocketTest.h.
|
inlineoverrideprivatevirtualnoexcept |
readEOF() will be invoked when the transport is closed.
The read callback will be automatically uninstalled immediately before readEOF() is invoked.
Implements folly::AsyncReader::ReadCallback.
Definition at line 976 of file AsyncSSLSocketTest.h.
References folly::SendMsgParamsCallbackBase::socket_.
|
inlineoverrideprivatevirtualnoexcept |
readError() will be invoked if an error occurs reading from the transport.
The read callback will be automatically uninstalled immediately before readError() is invoked.
ex | An exception describing the error that occurred. |
Implements folly::AsyncReader::ReadCallback.
Definition at line 979 of file AsyncSSLSocketTest.h.
References ADD_FAILURE.
folly::Optional<AsyncSocketException> folly::AlpnServer::except |
Definition at line 961 of file AsyncSSLSocketTest.h.
const unsigned char* folly::AlpnServer::nextProto |
Definition at line 959 of file AsyncSSLSocketTest.h.
unsigned folly::AlpnServer::nextProtoLength |
Definition at line 960 of file AsyncSSLSocketTest.h.
|
private |
Definition at line 983 of file AsyncSSLSocketTest.h.