mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
72dd666777
The regular blocking evutil_getaddrinfo() already supported /etc/hosts by falling back to getaddrinfo() or gethostbyname(). But evdns_getaddrinfo() had no such facility. Now it does. The data structure here isn't very clever. I guess people with huge /etc/hosts files will either need to get out of the 1980s, or submit a patch to this code so that it uses a hashtable instead of a linked list. Includes basic unit tests.