Code

Use stdbool.h's bool type instead of _Bool.
[sysdb.git] / src / include / frontend / sock.h
index 7d1fd7a3ceed81995e790921a2258949d8d25f7a..be07329d41e42f60f0ce41fcd51e18a46391735a 100644 (file)
@@ -25,6 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <stdbool.h>
 #include <unistd.h>
 
 #ifndef SDB_FRONTEND_SOCK_H
@@ -40,7 +41,7 @@ typedef struct {
        size_t num_threads;
 
        /* front-end listener shuts down when this is set to false */
-       _Bool do_loop;
+       bool do_loop;
 } sdb_fe_loop_t;
 #define SDB_FE_LOOP_INIT { 5, 1 }
 
@@ -83,6 +84,14 @@ sdb_fe_sock_destroy(sdb_fe_socket_t *sock);
 int
 sdb_fe_sock_add_listener(sdb_fe_socket_t *sock, const char *address);
 
+/*
+ * sdb_fe_sock_clear_listeners:
+ * Shut down all listeners from the socket object and clear the list of
+ * listeners. All open connections will not be affected by this.
+ */
+void
+sdb_fe_sock_clear_listeners(sdb_fe_socket_t *sock);
+
 /*
  * sdb_fe_sock_listen_and_serve:
  * Listen on the specified socket and serve client requests. The loop