index 7d1fd7a3ceed81995e790921a2258949d8d25f7a..37354c21af026e7ec171085985d8bfd865e6ce46 100644 (file)
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "utils/ssl.h"
+
+#include <stdbool.h>
#include <unistd.h>
#ifndef SDB_FRONTEND_SOCK_H
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 }
*
* - unix: listen on a UNIX socket
*
+ * If specified, the SSL options will be used for any SSL connection.
+ *
* Returns:
* - 0 on success
* - a negative value else
*/
int
-sdb_fe_sock_add_listener(sdb_fe_socket_t *sock, const char *address);
+sdb_fe_sock_add_listener(sdb_fe_socket_t *sock, const char *address,
+ const sdb_ssl_options_t *opts);
+
+/*
+ * 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: