proxygen
|
#include <AsyncServerSocket.h>
Public Member Functions | |
virtual | ~ConnectionEventCallback ()=default |
virtual void | onConnectionAccepted (const int socket, const SocketAddress &addr) noexcept=0 |
virtual void | onConnectionAcceptError (const int err) noexcept=0 |
virtual void | onConnectionDropped (const int socket, const SocketAddress &addr) noexcept=0 |
virtual void | onConnectionEnqueuedForAcceptorCallback (const int socket, const SocketAddress &addr) noexcept=0 |
virtual void | onConnectionDequeuedByAcceptorCallback (const int socket, const SocketAddress &addr) noexcept=0 |
virtual void | onBackoffStarted () noexcept=0 |
virtual void | onBackoffEnded () noexcept=0 |
virtual void | onBackoffError () noexcept=0 |
A callback interface to get notified of client socket events.
The ConnectionEventCallback implementations need to be thread-safe as the callbacks may be called from different threads.
Definition at line 77 of file AsyncServerSocket.h.
|
virtualdefault |
|
pure virtualnoexcept |
onBackoffEnded is called when the backoff period has ended and the socket has successfully resumed accepting new connections if there is any AcceptCallback registered.
Implemented in folly::test::TestConnectionEventCallback.
Referenced by folly::AsyncServerSocket::backoffTimeoutExpired().
|
pure virtualnoexcept |
onBackoffError is called when there is an error entering backoff
Implemented in folly::test::TestConnectionEventCallback.
Referenced by folly::AsyncServerSocket::enterBackoff().
|
pure virtualnoexcept |
onBackoffStarted is called when the socket has successfully started backing off accepting new client sockets.
Implemented in folly::test::TestConnectionEventCallback.
Referenced by folly::AsyncServerSocket::enterBackoff().
|
pure virtualnoexcept |
onConnectionAccepted() is called right after a client connection is accepted using the system accept()/accept4() APIs.
Implemented in folly::test::TestConnectionEventCallback.
Referenced by folly::AsyncServerSocket::handlerReady().
|
pure virtualnoexcept |
onConnectionAcceptError() is called when an error occurred accepting a connection.
Implemented in folly::test::TestConnectionEventCallback.
Referenced by folly::AsyncServerSocket::handlerReady().
|
pure virtualnoexcept |
onConnectionDequeuedByAcceptorCallback() is called when the connection is successfully dequeued by an AcceptCallback.
Implemented in folly::test::TestConnectionEventCallback.
Referenced by folly::AsyncServerSocket::RemoteAcceptor::messageAvailable().
|
pure virtualnoexcept |
onConnectionDropped() is called when a connection is dropped, probably because of some error encountered.
Implemented in folly::test::TestConnectionEventCallback.
Referenced by folly::AsyncServerSocket::dispatchSocket(), and folly::AsyncServerSocket::handlerReady().
|
pure virtualnoexcept |
onConnectionEnqueuedForAcceptorCallback() is called when the connection is successfully enqueued for an AcceptCallback to pick up.
Implemented in folly::test::TestConnectionEventCallback.
Referenced by folly::AsyncServerSocket::dispatchSocket().