This option (default OFF) automatically splits the file (with split.py)
into a header & source file, then compiles it as a shared/static
library. This requires an installed Python v3 executable to work.
This also adds a HTTPLIB_IS_COMPILED boolean that's available after a
finfind_package(httplib) call.
Note that the minimum Cmake version increased to 3.12 because of FindPython3.
Hopefully this isn't a problem, as it's already 3 years old at this point.
* Revert "Removed CMakeLists.txt. (Fix#421)"
This reverts commit 8674555b88f3b1eb9721eafdf690eeb8e99491af.
* Fail if cmake version too old
Previous behaviour is just a warning.
* Improve CMakeLists
Adds automatic dependency finding (if they were used).
Adds a way to require a specific version in the find_package(httplib) call.
You should link against the httplib::httplib IMPORTED target, which is
created automatically.
Add options to allow for strictly requiring OpenSSL/ZLIB
HTTPLIB_REQUIRE_OPENSSL & HTTPLIB_REQUIRE_ZLIB require the libs be found, or the build fails.
HTTPLIB_USE_OPENSSL_IF_AVAILABLE & HTTPLIB_USE_ZLIB_IF_AVAILABLE silently search for the libs.
If they aren't found, the build still continues, but shuts off support for those features.
* Add documentation to CMakeLists.txt
Has info on all the available options and what targets are produced.
Also put some things about installation on certain platforms.
In case we want to send a lot of data,
and the receiver is slower than the sender.
This will first fill up the receivers queues and after this
eventually also the senders queues,
until the socket is temporarily unable to accept more data to send.
select_write is done with an timeout of zero,
which makes the select call used always return immediately:
(see http://man7.org/linux/man-pages/man2/select.2.html)
This means that every marginal unavailability will make it return false
for is_writable and therefore httplib will immediately abort the transfer.
Therefore make this values configurable in the same way
as the read timeout already is.
Set the default write timeout to 5 seconds,
the same default value used for the read timeout.
According to RFC 3493 the socket option IPV6_V6ONLY
should be off by default, see
https://tools.ietf.org/html/rfc3493#page-22 (chapter 5.3).
However this does not seem to be the case on all systems.
For instance on any Windows OS, the option is on by default.
Therefore clear this option in order to allow
an server socket which can support IPv6 and IPv4 at the same time.