Summary: Renaming `EnqueuedForAccept` and `DequeuedByAccept` to
`EnqueuedForAcceptor` and `DequeuedByAcceptor` respectively to make it clear
that the connection is queued for the Acceptor not to call `accept` on.
Reviewed By: yfeldblum
Differential Revision:
D2554578
fb-gh-sync-id:
072a9ff122658827d1e89f2bef79ad565dad7974
case MessageType::MSG_NEW_CONN:
{
if (connectionEventCallback_) {
- connectionEventCallback_->onConnectionDequeuedByAcceptCallback(
+ connectionEventCallback_->onConnectionDequeuedByAcceptorCallback(
msg.fd, msg.address);
}
callback_->connectionAccepted(msg.fd, msg.address);
while (true) {
if (info->consumer->getQueue()->tryPutMessageNoThrow(std::move(msg))) {
if (connectionEventCallback_) {
- connectionEventCallback_->onConnectionEnqueuedForAcceptCallback(socket,
- addr);
+ connectionEventCallback_->onConnectionEnqueuedForAcceptorCallback(
+ socket,
+ addr);
}
// Success! return.
return;
const SocketAddress& addr) noexcept = 0;
/**
- * onConnectionEnqueuedForAcceptCallback() is called when the
+ * onConnectionEnqueuedForAcceptorCallback() is called when the
* connection is successfully enqueued for an AcceptCallback to pick up.
*/
- virtual void onConnectionEnqueuedForAcceptCallback(
+ virtual void onConnectionEnqueuedForAcceptorCallback(
const int socket,
const SocketAddress& addr) noexcept = 0;
/**
- * onConnectionDequeuedByAcceptCallback() is called when the
+ * onConnectionDequeuedByAcceptorCallback() is called when the
* connection is successfully dequeued by an AcceptCallback.
*/
- virtual void onConnectionDequeuedByAcceptCallback(
+ virtual void onConnectionDequeuedByAcceptorCallback(
const int socket,
const SocketAddress& addr) noexcept = 0;
connectionDropped_++;
}
- virtual void onConnectionEnqueuedForAcceptCallback(
+ virtual void onConnectionEnqueuedForAcceptorCallback(
const int socket,
const SocketAddress& addr) noexcept override {
folly::RWSpinLock::WriteHolder holder(spinLock_);
connectionEnqueuedForAcceptCallback_++;
}
- virtual void onConnectionDequeuedByAcceptCallback(
+ virtual void onConnectionDequeuedByAcceptorCallback(
const int socket,
const SocketAddress& addr) noexcept override {
folly::RWSpinLock::WriteHolder holder(spinLock_);