proxygen
ConnCallback Class Reference

#include <AsyncSocketTest.h>

Inheritance diagram for ConnCallback:
folly::AsyncSocket::ConnectCallback

Public Member Functions

 ConnCallback ()
 
void connectSuccess () noexceptoverride
 
void connectErr (const folly::AsyncSocketException &ex) noexceptoverride
 
- Public Member Functions inherited from folly::AsyncSocket::ConnectCallback
virtual ~ConnectCallback ()=default
 

Public Attributes

StateEnum state
 
folly::AsyncSocketException exception
 
VoidCallback successCallback
 
VoidCallback errorCallback
 

Detailed Description

Definition at line 28 of file AsyncSocketTest.h.

Constructor & Destructor Documentation

ConnCallback::ConnCallback ( )
inline

Member Function Documentation

void ConnCallback::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 41 of file AsyncSocketTest.h.

References errorCallback, exception, and STATE_FAILED.

41  {
43  exception = ex;
44  if (errorCallback) {
45  errorCallback();
46  }
47  }
folly::AsyncSocketException exception
VoidCallback errorCallback
state
Definition: http_parser.c:272
void ConnCallback::connectSuccess ( )
inlineoverridevirtualnoexcept

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

Implements folly::AsyncSocket::ConnectCallback.

Definition at line 34 of file AsyncSocketTest.h.

References STATE_SUCCEEDED, and successCallback.

34  {
36  if (successCallback) {
38  }
39  }
VoidCallback successCallback
state
Definition: http_parser.c:272

Member Data Documentation

VoidCallback ConnCallback::errorCallback

Definition at line 52 of file AsyncSocketTest.h.

Referenced by connectErr(), and WriteCallback::writeErr().

folly::AsyncSocketException ConnCallback::exception

Definition at line 50 of file AsyncSocketTest.h.

Referenced by connectErr(), ReadCallback::readErr(), TEST(), and WriteCallback::writeErr().

StateEnum ConnCallback::state

Definition at line 49 of file AsyncSocketTest.h.

Referenced by TEST(), folly::TEST(), TEST_P(), and testConnectOptWrite().

VoidCallback ConnCallback::successCallback

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