From: Mohammad Husain Date: Tue, 13 Oct 2015 17:21:40 +0000 (-0700) Subject: Getter to know if the socket is accepting new connections X-Git-Tag: deprecate-dynamic-initializer~335 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=19b1f5f765dc59354416fbd6df24fa7a39d4b390;p=folly.git Getter to know if the socket is accepting new connections Reviewed By: @yfeldblum Differential Revision: D2534627 fb-gh-sync-id: 2934911b69542b4befa8dc03ec3cadb4a148496d --- 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.