aboutsummaryrefslogtreecommitdiff
path: root/server.h
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-04-28 00:19:32 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-07-20 23:52:53 +0200
commit2e8485d687dd5f673b8d2aadb0816571d3f32cb7 (patch)
tree6319effdcacf839e8f2a899565cf6460b32c08ec /server.h
parent82fffd1acebf688f1c082d7a597d68239e8a39cc (diff)
downloadlibweb-2e8485d687dd5f673b8d2aadb0816571d3f32cb7.tar.gz
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.
Diffstat (limited to 'server.h')
-rw-r--r--server.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.h b/server.h
index 74189db..74f06ae 100644
--- a/server.h
+++ b/server.h
@@ -5,7 +5,7 @@
#include <stddef.h>
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);