index ba33d13c194ff575774108ac5bf1af4cc7954b2c..7d1fd7a3ceed81995e790921a2258949d8d25f7a 100644 (file)
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <unistd.h>
+
#ifndef SDB_FRONTEND_SOCK_H
#define SDB_FRONTEND_SOCK_H 1
/* manage a front-end listener loop */
typedef struct {
+ /* number of handler threads to create */
+ size_t num_threads;
+
+ /* front-end listener shuts down when this is set to false */
_Bool do_loop;
} sdb_fe_loop_t;
-#define SDB_FE_LOOP_INIT { 1 }
+#define SDB_FE_LOOP_INIT { 5, 1 }
/*
* sdb_fe_socket_t:
/*
* sdb_fe_sock_listen_and_serve:
* Listen on the specified socket and serve client requests. The loop
- * terminates on error or when the loop condition turns to false.
+ * terminates on error or when the loop condition turns to false. All
+ * listening sockets will be closed at that time.
*
* Returns:
* - 0 on success