mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-08 16:11:18 +00:00
Add optional poll() implementation under MG_ENABLE_POLL
This adds the ability to substitute select() with poll() on supported unix environments when MG_ENABLE_POLL is defined. A make flag called USE_POLL is provided as well. Using poll() removes the limitation of FD_SETSIZE concurrent sockets, generally 1024 on Linux environments.
This commit is contained in:
5 files changed
+84
-2
No files matched your search
@@ -22,7 +22,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined(MG_ENABLE_POLL) && MG_ENABLE_POLL
|
||||
#include <poll.h>
|
||||
#else
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
Reference in new issue
Block a user