Make poll() the default ()

* 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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 57 additions and 8 deletions

View file

@ -872,10 +872,10 @@ res->body; // Compressed data
```
Use `poll` instead of `select`
------------------------------
Use `select()` instead of `poll()`
----------------------------------
`select` system call is used as default since it's more widely supported. If you want to let cpp-httplib use `poll` instead, you can do so with `CPPHTTPLIB_USE_POLL`.
cpp-httplib defaults to the widely supported `poll()` system call. If your OS lacks support for `poll()`, define `CPPHTTPLIB_USE_SELECT` to use `select()` instead.
Unix Domain Socket Support
--------------------------