folly::AsyncSocketObserverInterface

Observer of socket events.

Synopsis

Declared in <folly/io/async/observer/AsyncSocketObserverInterface.h>

class AsyncSocketObserverInterface;

Types

NameDescription
ByteEvent Structure used to communicate ByteEvents, such as TX and ACK timestamps.
PrewriteRequest Request that can be generated by observer in response to prewrite event.
PrewriteRequestContainer Container of PrewriteRequests passed on invocation of prewrite().
PrewriteState Information provided to observer during prewrite event.

Enums

NameDescription
Events Set of interface events an observer can subscribe to.

Member Functions

NameDescription
AsyncSocketObserverInterface [constructor]Constructs the observer interface.
~AsyncSocketObserverInterface [destructor] [virtual]Destroys the observer interface.
byteEvent [virtual]Invoked each time a ByteEvent is available.
byteEventsEnabled [virtual]Invoked if ByteEvents are enabled.
byteEventsUnavailable [virtual]Invoked if ByteEvents could not be enabled, or if an error occurred that will prevent further delivery of ByteEvents.
close [virtual]close() will be invoked when the socket is being closed.
connectAttempt [virtual]connectAttempt() will be invoked when connect() is called.
connectError [virtual]connectError() will be invoked when connect() returns an error.
connectSuccess [virtual]connectSuccess() will be invoked when connect() returns successfully.
evbAttach [virtual]Invoked when the socket is being attached to an EventBase.
evbDetach [virtual]Invoked when the socket is being detached from an EventBase.
fdAttach [virtual]fdAttach() is invoked when the socket file descriptor is attached.
fdDetach [virtual]fdDetach() is invoked if the socket file descriptor is detached.
move [virtual]move() will be invoked when a new AsyncSocket is being constructed via constructor AsyncSocket(AsyncSocket* oldAsyncSocket) from an AsyncSocket that has an observer attached.
prewrite [virtual]Invoked before each write to the socket if prewrite support enabled.

Derived Classes

NameDescription
LegacyLifecycleObserver Observer of socket events.