folly::coro::ConnectCallback

Handles the connect operation for an AsyncSocketTransport.

Synopsis

Declared in <folly/io/coro/TransportCallbacks.h>

class ConnectCallback
    : public TransportCallbackBase
    , public folly::AsyncSocketTransport::ConnectCallback

Base Classes

NameDescription
TransportCallbackBaseCommon base for all transport callbacks.
folly::AsyncSocketTransport::ConnectCallbackCallback invoked on the outcome of a connection attempt.

Member Functions

NameDescription
ConnectCallback [constructor]Constructs a connect callback for socket.
connectErr [virtual]connectErr() will be invoked if the connection attempt fails.
connectSuccess [virtual]connectSuccess() will be invoked when the connection has been successfully established.
error Returns the stored error, if any.
post Signals completion to the waiting coroutine.
preConnect [virtual]preConnect() will be invoked just before the actual connect happens, default is no-ops.
wait Waits for the callback to complete, honoring cancellation.

Protected Member Functions

NameDescription
storeException Stores ex as the callback's error, preserving SSL error details.

Protected Data Members

NameDescription
baton_ Baton used to notify the other side of completion.
error_ Wraps any AsyncTransport error.
transport_ Transport whose state the callback modifies, e.g. to cancel callbacks.