diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-04-28 00:19:32 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-05-01 04:13:16 +0200 |
| commit | dc063b90cbf13a463c29ee5b81abeb07b6698473 (patch) | |
| tree | 83a2fbeb983c695eb6030e47f7fb3f6904edb8b4 /server.h | |
| parent | fa997aa2c153cef50941b4d4036694485259ac2a (diff) | |
| download | slcl-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |
