From a55c8ef63bb4941fdee5ddf00ed564e246c8a939 Mon Sep 17 00:00:00 2001 From: Soikk Date: Sat, 6 Dec 2025 20:16:37 +0100 Subject: Reworked worker architecture - replaced the central socket-multiple accepts architecture thanks to SO_REUSEPORT - removed master/worker distinctions for server and config - fixed bug with rewrites not being read properly by multiple workers because of null characters --- src/config/config.h | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/config/config.h') diff --git a/src/config/config.h b/src/config/config.h index 70435ac..508d5ae 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -9,16 +9,11 @@ #include -typedef struct config_m { +typedef struct config { str file; str name; str port; int backlog; -} config_m; - -typedef struct config_w { - str file; - str name; str root; str bundle; str cert; @@ -27,18 +22,15 @@ typedef struct config_w { uint ipv4 : 1; uint ipv6 : 1; str *files; -} config_w; +} config; -config_m master_config(char *filename); -config_w worker_config(char *filename); +config read_config(char *filename); str get_key(str file, str key); -void free_master_config(config_m *conf); -void free_worker_config(config_w *conf); +void free_config(config *conf); -void print_master_config(config_m conf); -void print_worker_config(config_w conf); +void print_config(config conf); #endif \ No newline at end of file -- cgit v1.2.3