refactor(config): add workers number to config

This commit is contained in:
2026-03-11 16:33:15 +01:00
parent 15d6ae6829
commit 8f47a0b666
4 changed files with 7 additions and 11 deletions
+1
View File
@@ -19,6 +19,7 @@ typedef struct cws_config {
char *host;
char *port;
char *root;
int workers;
cws_vhost_s *virtual_hosts;
unsigned virtual_hosts_count;
} cws_config_s;
+1 -7
View File
@@ -13,17 +13,11 @@
#define CWS_SERVER_BACKLOG 128
/* Max number of epoll events processed per iteration */
#define CWS_SERVER_EPOLL_MAXEVENTS 64
#define CWS_SERVER_EPOLL_MAXEVENTS 128
/* Blocking timeout for epoll_wait in ms */
#define CWS_SERVER_EPOLL_TIMEOUT 3000
/* Maximum allowed HTTP request size */
#define CWS_SERVER_MAX_REQUEST_SIZE (16 * 1024) /* 16KB */
/* Number of worker threads */
#define CWS_WORKERS_NUM 6
/* Global flag used to stop server */
extern volatile sig_atomic_t cws_server_run;