refactor: worker struct and remove pipe

This commit is contained in:
2025-10-17 21:18:13 +02:00
parent 81bdd2acda
commit 01d29ff9f3
14 changed files with 139 additions and 93 deletions

View File

@@ -5,14 +5,13 @@
#include <pthread.h>
#include <signal.h>
#include "../utils/config.h"
#include "../config/config.h"
#include "../utils/utils.h"
extern volatile sig_atomic_t cws_server_run;
typedef struct cws_worker {
int epfd;
int pipefd[2];
size_t clients_num;
pthread_t thread;
cws_config_s *config;
@@ -26,10 +25,6 @@ void *cws_worker_loop(void *arg);
void cws_server_close_client(int epfd, int client_fd);
cws_server_ret cws_epoll_add(int epfd, int sockfd);
cws_server_ret cws_epoll_del(int epfd, int sockfd);
cws_server_ret cws_server_handle_client_data(int epfd, int client_fd);
#endif