Getter to know if the socket is accepting new connections
authorMohammad Husain <mhusain@fb.com>
Tue, 13 Oct 2015 17:21:40 +0000 (10:21 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Tue, 13 Oct 2015 18:20:19 +0000 (11:20 -0700)
Reviewed By: @yfeldblum

Differential Revision: D2534627

fb-gh-sync-id: 2934911b69542b4befa8dc03ec3cadb4a148496d

folly/io/async/AsyncServerSocket.h

index 51fc6493a5893910fc137f4711af37da3f38b81e..935e1917049722fea6079d9af4655e2c60be52da 100644 (file)
@@ -577,6 +577,13 @@ class AsyncServerSocket : public DelayedDestruction
     return closeOnExec_;
   }
 
+  /**
+   * Get whether or not the socket is accepting new connections
+   */
+  bool getAccepting() const {
+    return accepting_;
+  }
+
  protected:
   /**
    * Protected destructor.