I am planning to replace the gethostbyname() blocking call with the
asynchronous library routines , i.e., libcares.
But, before I do that, how do I go about testing the blocking call ,
and subsequently on replacing with libcares routines, the
asynchronousity (i know ,it;s not even a word)
Thanks,
Raseel
http://www.raseel.in/techblog
> Hi,
>
> I am planning to replace the gethostbyname() blocking call with the
> asynchronous library routines , i.e., libcares.
>
> But, before I do that, how do I go about testing the blocking call , and
> subsequently on replacing with libcares routines, the asynchronousity (i
> know ,it;s not even a word)
First note that these are not the same thing, so you cannot replace one
with the other directly.
c-ares[1] is an async. DNS resolver library.
gethostbyname() / getaddrinfo() / etc. are functions which resolve a name
to a sockaddr * based on system configuration. This need not use DNS, and
at the very least is likely to include /etc/hosts type lookups as well as
DNS.
[1] Assuming you mean: http://daniel.haxx.se/projects/c-ares/
--
James Antill -- ja...@and.org
C String APIs use too much memory? ustr: length, ref count, size and
read-only/fixed. Ave. 44% overhead over strdup(), for 0-20B strings
http://www.and.org/ustr/