curl-library
Re: Asynch DNS in Curl
Date: Mon, 15 Sep 2003 00:51:17 +0200 (CEST)
On Sun, 14 Sep 2003, codemastr wrote:
> I think you misunderstood me, I was not suggesting that you use ADNS or
> FireDNS, merely that you look at their code at the "idea level". Meaning get
> an understanding of what their logic was and then implement it using your
> own code. I personally find reading someone elses code easier than looking
> at half a dozen cryptic RFCs.
Thanks for the suggestion, but I don't think I have a general problem with how
to add IPv6 support, as it should be pretty straight-forward. I just don't
have the time for it. Also, I don't have any particular need or anything to
bring this functionality except for my own curiosity, so there's no hurry from
my end.
> I personally don't really care which library is used, all I want is IPv6
> support. If you can get IPv6 support in ares then I'm happy.
I hope I or someone else will make that happen one day.
> By the way, this is something I was thinking of recently (sort of
> unrelated). Some programs have "managed" sockets. What I mean by that is
> they have a layer of abstraction they used with the sockets. What I'm
> suggesting is 2 new callback routines. CURLOPT_SOCKETFUNCTION
> CURLOPT_CLOSESOCKETFUNCTION. That way I can control the socket allocation
> and use whatever I want. For me personally, my program has an array from 0..
> FD_SETSIZE. Each item in that array represents an fd. If I am going to
> allocate an fd for curl I have to do something like thearray[thefd].flags =
> SOCK_INUSE|SOCK_LIBCURL; when the socket is created. I then have to do
> something like thearray[thefd].flags = 0; when the socket is destroyed. So
> basically, what I'm suggesting is give some callback routines. Then I can
> just make a my_createsocket which calls socket(), updates my array, and
> returns whatever socket() returned. The same idea would work for close().
> I'm sure there are many programs out there that use their own socket system
> just like mine does, so I think it would be beneficial if libcurl could have
> the ability to work with such systems.
Can you elaborate a little on why you need this "managed sockets" in the first
place? I mean, I can understand what you write above just fine I just don't
understand why you (need to) do this!
-- Daniel Stenberg -- curl: been grokking URLs since 1998 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2003-09-15