[Development] API review for a new QDnsResolver class
Jeremy Lainé
jeremy.laine at m4x.org
Thu Nov 10 07:54:55 CET 2011
On 11/09/2011 07:41 PM, Giuseppe D'Angelo wrote:
> On 9 November 2011 18:35, Jeremy Lainé<jeremy.laine at m4x.org> wrote:
>> C/ you make QDnsReply's constructor public, and let the user manage the lifetime of the
>> object. This is what the Q3Dns API looks like. What I don't like about Q3Dns's API is that
>> it's unclear when the request is actually made.
> It starts after you return to the event loop, just like all the other
> socket classes
What I mean is that the Q3Dns has setters as well as a constructor with arguments, so for
instance:
Q3Dns *dns = new Q3Dns;
dns->setLabel("foodomain.org");// will a request be triggered if I stop here and don't
specify the record type?
dns->setRecordType(Q3Dns::AAAA);
.. later ..
dns->setLabel("bardomain.org"); // will a new request be issued, since I changed the
queried domain? What happens to the existing results?
Jeremy
More information about the Development
mailing list