Subject: Re: Callback for DNS query

Re: Callback for DNS query

From: Erik Kline <ek_at_google.com>
Date: Mon, 4 May 2009 15:40:20 -0700

Why not extend the callback to include the error code of the writev() and
then call the callback /after/ the writev()s?

Hmm, on second thought I guess the writes can return EAGAIN? Nonetheless,
why not wait until the write has been known to have either succeeded or
failed?

Possibly my cursory review hasn't refreshed my memory of how things are
supposed to work.

2009/5/4 Alexey Simak <alexeysimak_at_gmail.com>

> Hi Daniel,
>
> I added a callback for DNS queries.
> Please have a look at the attached file with changes.
>
> Thanks,
> Alexey Simak
>
> ----- Original Message ----- From: "Daniel Stenberg" <daniel_at_haxx.se>
> To: "c-ares hacking" <c-ares_at_cool.haxx.se>
> Sent: Sunday, January 11, 2009 1:16 AM
> Subject: Re: Callback for DNS query
>
> On Fri, 9 Jan 2009, Alexey Simak wrote:
>>
>> I suggest to call callback also before sending request to server. To
>>> implement this feature we can use existing callback( need to add new status
>>> code in this case ) or introduce a new request callback.
>>>
>>> Which way is preferable from your point of view?
>>>
>>
>> I would prefer a new callback since the current callback as you say is
>> used for the response (or lack of response).
>>
>> And if you do add a new callback, keep in mind that we don't want to break
>> the ABI so you should probably add that with a new ares_set_* function.
>>
>> What about resolves that are done by the use of /etc/hosts etc? Will they
>> call the callback too?
>>
>> --
>>
>> / daniel.haxx.se
>
>
Received on 2009-05-05