1
0
mirror of synced 2025-06-12 07:41:53 +03:00

Make poll() the default (#2065)

* Make poll() the default

select() can still be enabled by defining CPPHTTPLIB_USE_SELECT.

* Run tests with select() and poll()
This commit is contained in:
Florian Albrechtskirchinger
2025-02-18 11:23:23 +01:00
committed by GitHub
parent cdc223019a
commit 6e73a63153
6 changed files with 57 additions and 8 deletions

View File

@ -145,6 +145,12 @@
#define CPPHTTPLIB_LISTEN_BACKLOG 5
#endif
#if !defined(CPPHTTPLIB_USE_POLL) && !defined(CPPHTTPLIB_USE_SELECT)
#define CPPHTTPLIB_USE_POLL
#elif defined(CPPHTTPLIB_USE_POLL) && defined(CPPHTTPLIB_USE_SELECT)
#error "CPPHTTPLIB_USE_POLL and CPPHTTPLIB_USE_SELECT are mutually exclusive"
#endif
/*
* Headers
*/