summaryrefslogtreecommitdiff
path: root/src/config/config.h
diff options
context:
space:
mode:
authorSoikk2025-12-06 20:16:37 +0100
committerSoikk2025-12-06 20:19:18 +0100
commita55c8ef63bb4941fdee5ddf00ed564e246c8a939 (patch)
treeeed8f07ee9c2deb5d82d9dac130ef228a0b7b705 /src/config/config.h
parent534303b80b5304a2b29d456d6b5c7a6ac1daaf1c (diff)
downloadsoikk-server-a55c8ef63bb4941fdee5ddf00ed564e246c8a939.tar.xz
soikk-server-a55c8ef63bb4941fdee5ddf00ed564e246c8a939.tar.zst
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
Diffstat (limited to 'src/config/config.h')
-rw-r--r--src/config/config.h18
1 files changed, 5 insertions, 13 deletions
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 <errno.h>
-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