From 2e8485d687dd5f673b8d2aadb0816571d3f32cb7 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Fri, 28 Apr 2023 00:19:32 +0200 Subject: Replace select(2) with poll(2) select(2) has a number of well-known issues (e.g.: FD_SETSIZE limiting the maximum amount of file descriptors to watch) that are mostly solved by poll(2) and thus can be used as a drop-in replacement. --- server.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server.h') diff --git a/server.h b/server.h index 74189db..74f06ae 100644 --- a/server.h +++ b/server.h @@ -5,7 +5,7 @@ #include struct server *server_init(unsigned short port); -struct server_client *server_select(struct server *s, bool *io, bool *exit); +struct server_client *server_poll(struct server *s, bool *io, bool *exit); int server_read(void *buf, size_t n, struct server_client *c); int server_write(const void *buf, size_t n, struct server_client *c); int server_close(struct server *s); -- cgit v1.2.3