initial client_info support

This commit is contained in:
2025-08-02 17:19:07 +02:00
parent 528519c6ce
commit 17e0622e56
4 changed files with 35 additions and 14 deletions

View File

@@ -4,6 +4,7 @@
#include <netdb.h>
#include <signal.h>
#include <sys/socket.h>
#include <time.h>
#include "myclib/hashmap/myhashmap.h"
#include "utils/config.h"
@@ -14,7 +15,7 @@
/* Size of the epoll_event array */
#define CWS_SERVER_EPOLL_MAXEVENTS 64
#define CWS_SERVER_EPOLL_TIMEOUT 1000
#define CWS_SERVER_EPOLL_TIMEOUT 3000
#define CWS_SERVER_MAX_REQUEST_SIZE (16 * 1024) /* 16KB */
@@ -43,6 +44,11 @@ typedef enum cws_server_ret_t {
CWS_SERVER_REQUEST_TOO_LARGE,
} cws_server_ret;
typedef struct cws_client_t {
struct sockaddr_storage addr;
time_t last_activity;
} cws_client;
/**
* @brief Setups hints object
*