From 19b1f5f765dc59354416fbd6df24fa7a39d4b390 Mon Sep 17 00:00:00 2001 From: Mohammad Husain <mhusain@fb.com> Date: Tue, 13 Oct 2015 10:21:40 -0700 Subject: [PATCH] Getter to know if the socket is accepting new connections Reviewed By: @yfeldblum Differential Revision: D2534627 fb-gh-sync-id: 2934911b69542b4befa8dc03ec3cadb4a148496d --- folly/io/async/AsyncServerSocket.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/folly/io/async/AsyncServerSocket.h b/folly/io/async/AsyncServerSocket.h index 51fc6493..935e1917 100644 --- a/folly/io/async/AsyncServerSocket.h +++ b/folly/io/async/AsyncServerSocket.h @@ -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. -- 2.34.1