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-05-01 04:13:16 +0200
commitdc063b90cbf13a463c29ee5b81abeb07b6698473 (patch)
tree83a2fbeb983c695eb6030e47f7fb3f6904edb8b4 /server.h
parentfa997aa2c153cef50941b4d4036694485259ac2a (diff)
downloadslcl-dc063b90cbf13a463c29ee5b81abeb07b6698473.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);