proxygen
|
#include <AsyncSocketTest2.h>
Public Member Functions | |
void | onConnectionAccepted (const int, const SocketAddress &) noexceptoverride |
void | onConnectionAcceptError (const int) noexceptoverride |
void | onConnectionDropped (const int, const SocketAddress &) noexceptoverride |
void | onConnectionEnqueuedForAcceptorCallback (const int, const SocketAddress &) noexceptoverride |
void | onConnectionDequeuedByAcceptorCallback (const int, const SocketAddress &) noexceptoverride |
void | onBackoffStarted () noexceptoverride |
void | onBackoffEnded () noexceptoverride |
void | onBackoffError () noexceptoverride |
unsigned int | getConnectionAccepted () const |
unsigned int | getConnectionAcceptedError () const |
unsigned int | getConnectionDropped () const |
unsigned int | getConnectionEnqueuedForAcceptCallback () const |
unsigned int | getConnectionDequeuedByAcceptCallback () const |
unsigned int | getBackoffStarted () const |
unsigned int | getBackoffEnded () const |
unsigned int | getBackoffError () const |
Public Member Functions inherited from folly::AsyncServerSocket::ConnectionEventCallback | |
virtual | ~ConnectionEventCallback ()=default |
Private Attributes | |
folly::RWSpinLock | spinLock_ |
unsigned int | connectionAccepted_ {0} |
unsigned int | connectionAcceptedError_ {0} |
unsigned int | connectionDropped_ {0} |
unsigned int | connectionEnqueuedForAcceptCallback_ {0} |
unsigned int | connectionDequeuedByAcceptCallback_ {0} |
unsigned int | backoffStarted_ {0} |
unsigned int | backoffEnded_ {0} |
unsigned int | backoffError_ {0} |
Helper ConnectionEventCallback class for the test code. It maintains counters protected by a spin lock.
Definition at line 34 of file AsyncSocketTest2.h.
|
inline |
Definition at line 115 of file AsyncSocketTest2.h.
References backoffEnded_, and spinLock_.
Referenced by TEST().
|
inline |
Definition at line 120 of file AsyncSocketTest2.h.
References backoffError_, and spinLock_.
Referenced by TEST().
|
inline |
Definition at line 110 of file AsyncSocketTest2.h.
References backoffStarted_, and spinLock_.
Referenced by TEST().
|
inline |
Definition at line 85 of file AsyncSocketTest2.h.
References connectionAccepted_, and spinLock_.
Referenced by TEST().
|
inline |
Definition at line 90 of file AsyncSocketTest2.h.
References connectionAcceptedError_, and spinLock_.
Referenced by TEST().
|
inline |
Definition at line 105 of file AsyncSocketTest2.h.
References connectionDequeuedByAcceptCallback_, and spinLock_.
Referenced by TEST().
|
inline |
Definition at line 95 of file AsyncSocketTest2.h.
References connectionDropped_, and spinLock_.
Referenced by TEST().
|
inline |
Definition at line 100 of file AsyncSocketTest2.h.
References connectionEnqueuedForAcceptCallback_, and spinLock_.
Referenced by TEST().
|
inlineoverridevirtualnoexcept |
onBackoffEnded is called when the backoff period has ended and the socket has successfully resumed accepting new connections if there is any AcceptCallback registered.
Implements folly::AsyncServerSocket::ConnectionEventCallback.
Definition at line 75 of file AsyncSocketTest2.h.
References backoffEnded_, and spinLock_.
|
inlineoverridevirtualnoexcept |
onBackoffError is called when there is an error entering backoff
Implements folly::AsyncServerSocket::ConnectionEventCallback.
Definition at line 80 of file AsyncSocketTest2.h.
References backoffError_, and spinLock_.
|
inlineoverridevirtualnoexcept |
onBackoffStarted is called when the socket has successfully started backing off accepting new client sockets.
Implements folly::AsyncServerSocket::ConnectionEventCallback.
Definition at line 70 of file AsyncSocketTest2.h.
References backoffStarted_, and spinLock_.
|
inlineoverridevirtualnoexcept |
onConnectionAccepted() is called right after a client connection is accepted using the system accept()/accept4() APIs.
Implements folly::AsyncServerSocket::ConnectionEventCallback.
Definition at line 37 of file AsyncSocketTest2.h.
References connectionAccepted_, and spinLock_.
|
inlineoverridevirtualnoexcept |
onConnectionAcceptError() is called when an error occurred accepting a connection.
Implements folly::AsyncServerSocket::ConnectionEventCallback.
Definition at line 44 of file AsyncSocketTest2.h.
References connectionAcceptedError_, and spinLock_.
|
inlineoverridevirtualnoexcept |
onConnectionDequeuedByAcceptorCallback() is called when the connection is successfully dequeued by an AcceptCallback.
Implements folly::AsyncServerSocket::ConnectionEventCallback.
Definition at line 63 of file AsyncSocketTest2.h.
References connectionDequeuedByAcceptCallback_, and spinLock_.
|
inlineoverridevirtualnoexcept |
onConnectionDropped() is called when a connection is dropped, probably because of some error encountered.
Implements folly::AsyncServerSocket::ConnectionEventCallback.
Definition at line 49 of file AsyncSocketTest2.h.
References connectionDropped_, and spinLock_.
|
inlineoverridevirtualnoexcept |
onConnectionEnqueuedForAcceptorCallback() is called when the connection is successfully enqueued for an AcceptCallback to pick up.
Implements folly::AsyncServerSocket::ConnectionEventCallback.
Definition at line 56 of file AsyncSocketTest2.h.
References connectionEnqueuedForAcceptCallback_, and spinLock_.
|
private |
Definition at line 133 of file AsyncSocketTest2.h.
Referenced by getBackoffEnded(), and onBackoffEnded().
|
private |
Definition at line 134 of file AsyncSocketTest2.h.
Referenced by getBackoffError(), and onBackoffError().
|
private |
Definition at line 132 of file AsyncSocketTest2.h.
Referenced by getBackoffStarted(), and onBackoffStarted().
|
private |
Definition at line 127 of file AsyncSocketTest2.h.
Referenced by getConnectionAccepted(), and onConnectionAccepted().
|
private |
Definition at line 128 of file AsyncSocketTest2.h.
Referenced by getConnectionAcceptedError(), and onConnectionAcceptError().
|
private |
Definition at line 131 of file AsyncSocketTest2.h.
Referenced by getConnectionDequeuedByAcceptCallback(), and onConnectionDequeuedByAcceptorCallback().
|
private |
Definition at line 129 of file AsyncSocketTest2.h.
Referenced by getConnectionDropped(), and onConnectionDropped().
|
private |
Definition at line 130 of file AsyncSocketTest2.h.
Referenced by getConnectionEnqueuedForAcceptCallback(), and onConnectionEnqueuedForAcceptorCallback().
|
mutableprivate |
Definition at line 126 of file AsyncSocketTest2.h.
Referenced by getBackoffEnded(), getBackoffError(), getBackoffStarted(), getConnectionAccepted(), getConnectionAcceptedError(), getConnectionDequeuedByAcceptCallback(), getConnectionDropped(), getConnectionEnqueuedForAcceptCallback(), onBackoffEnded(), onBackoffError(), onBackoffStarted(), onConnectionAccepted(), onConnectionAcceptError(), onConnectionDequeuedByAcceptorCallback(), onConnectionDropped(), and onConnectionEnqueuedForAcceptorCallback().