cURL / Mailing Lists / curl-library / Single Mail

curl-library

Unified asynch name resolving

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 25 Apr 2011 19:48:34 +0200 (CEST)

Hi!

I've just merged my unified-async-resolver branch into master and pushed it.

It converts the asynch resolver functionality - c-ares and threaded - to two
different implementaions of the same internal API that offer this to the
library at large.

At build time we of course select which (if any) asynch resolver backend to
use and that will provide this functionality.

The primary reason for this is to make the code cleaner and easier to follow,
as it makes it more straight-forward with less #ifdefs for the different
approaches.

A side-effect is that it will be easier to implement support for other asynch
resolver backends if anyone would be so inclined. I don't know of any that
we'd like to support so I can't say it is a very important outcome.

This change renames hostares.c and hostthre.c into asyn-ares.c asyn-thread.c
to better visualize their new roles. It also introduces the asyn.h header file
that holds the prototypes and structs for the new internal asynch resolver
API.

Feel free to try this out and point out my mistakes and help me polish this
to quality code. It seems to work, but I've had some bad valgrind hits in the
test suite that I'm not yet sure are valid complaints or false positives.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-25