refactoring server and add myclib

This commit is contained in:
2025-08-02 13:35:56 +02:00
parent fa964b2620
commit 2918aeadcb
14 changed files with 505 additions and 292 deletions

View File

@@ -7,8 +7,8 @@
#include <signal.h>
#include <sys/socket.h>
#include "myclib/hashmap/myhashmap.h"
#include "utils/config.h"
#include "utils/hashmap.h"
/* Clients max queue */
#define CWS_SERVER_BACKLOG 10
@@ -89,4 +89,7 @@ int cws_server_accept_client(int sockfd, struct sockaddr_storage *their_sa, sock
*/
void cws_server_close_client(int epfd, int client_fd, mcl_hashmap *hashmap);
int cws_server_handle_new_client(int sockfd, int epfd, mcl_hashmap *clients);
int cws_server_handle_client_data(int client_fd, int epfd, mcl_hashmap *clients, cws_config *config);
#endif