diff options
author | Johnny Richard <johnny@johnnyrichard.com> | 2022-04-07 15:59:05 +0200 |
---|---|---|
committer | Johnny Richard <johnny@johnnyrichard.com> | 2022-04-07 15:59:05 +0200 |
commit | de5ee6a519b86f5ff78e6849c5704243c8c9c109 (patch) | |
tree | aae9d3857b5c7357469539fb2b8ade026506ad98 /server.h | |
parent | 1b684971c3b591538c3ba0d3343ec76559f10203 (diff) |
server.c: Accept multiple clients concurrently
Diffstat (limited to 'server.h')
-rw-r--r-- | server.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -20,9 +20,16 @@ #include <stdint.h> #include <stdbool.h> +#include <sys/epoll.h> + +#define MAXEVENTS 64 typedef struct server { int fd; + int epoll_fd; + struct epoll_event events[MAXEVENTS]; + int connected_clients[MAXEVENTS]; + int connected_clients_index; bool running; } server_t; |