diff options
author | Andy Green <andy@warmcat.com> | 2019-09-19 06:54:53 +0100 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2019-09-19 06:54:53 +0100 |
commit | c591e1adfc716f7f83c56d14827c76b3b9d0fb6e (patch) | |
tree | 6eeea091b7f74780498ace68af10e779811e7934 /cmake | |
parent | 8b37f98feb8b2552a343bd436f6fc90d98c4949a (diff) | |
download | libwebsockets-c591e1adfc716f7f83c56d14827c76b3b9d0fb6e.tar.gz |
asynchronous dns for ipv4 and ipv6
This adds the option to have lws do its own dns resolution on
the event loop, without blocking. Existing implementations get
the name resolution done by the libc, which is blocking. In
the case you are opening client connections but need to carefully
manage latency, another connection opening and doing the name
resolution becomes a big problem.
Currently it supports
- ipv4 / A records
- ipv6 / AAAA records
- ipv4-over-ipv6 ::ffff:1.2.3.4 A record promotion for ipv6
- only one server supported over UDP :53
- nameserver discovery on linux, windows, freertos
It also has some nice advantages
- lws-style paranoid response parsing
- random unique tid generation to increase difficulty of poisoning
- it's really integrated with the lws event loop, it does not spawn
threads or use the libc resolver, and of course no blocking at all
- platform-specific server address capturing (from /etc/resolv.conf
on linux, windows apis on windows)
- it has LRU caching
- piggybacking (multiple requests before the first completes go on
a list on the first request, not spawn multiple requests)
- observes TTL in cache
- TTL and timeout use lws_sul timers on the event loop
- ipv6 pieces only built if cmake LWS_IPV6 enabled
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/lws_config.h.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/lws_config.h.in b/cmake/lws_config.h.in index 6dc7ee3c..ef120343 100644 --- a/cmake/lws_config.h.in +++ b/cmake/lws_config.h.in @@ -95,6 +95,7 @@ #cmakedefine LWS_WITH_ABSTRACT #cmakedefine LWS_WITH_ACCESS_LOG #cmakedefine LWS_WITH_ACME +#cmakedefine LWS_WITH_SYS_ASYNC_DNS #cmakedefine LWS_WITH_BORINGSSL #cmakedefine LWS_WITH_CGI #cmakedefine LWS_WITH_CUSTOM_HEADERS |