cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: asynchronous dns for multi interface

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 19 Jun 2002 15:31:07 +0200 (MET DST)

On Tue, 18 Jun 2002, Steve Dekorte wrote:

> That's a good point. Are there any other multiplatform async dns libs?

We want it to resolve names other than DNS too. DNS is the hardest part, but
it should check local hosts-files too etc.

I found a posting by a David Arnold that summarized his findings in this
area, and it is somewhat dissappointing:

http://elvin.dstc.com/ListArchive/elvin-dev/archive/2001/09/msg00027.html

> I got gnu adns working with curl from the outside(I replace the domain with
> the ip before handing the url to curl and do my own caching).

Ah. Yeah, that's of course one way to add it.

> I think an ideal solution would be to provide a dns callback. If set, curl
> would call a specified c function with the url and the handle. This
> callback would return immediately. After the lookup is complete, it the
> user code would call a standard curl api with the handle and result ip.
>
> However, that's a lot of work to implement.

This is basicly what I had in mind. We would add another state ("waiting for
the name to resolve state") so when using the multi interface, it would
return back control to the application until the name has resolved.

> The quick route would be to provide a API for parsing urls and a example
> code for using the multi api with gnu adns.

You mean to enable something like what you made?

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
----------------------------------------------------------------------------
                   Bringing you mounds of caffeinated joy
                   >>>     http://thinkgeek.com/sf    <<<
Received on 2002-06-19