First I'd like to thank you for your work. But there are some problems in the DNS code. Unfortunately I had no time to make a full review but here are some problems I found:
1. I was looking for some code for reseting a message and looking at the
| Code: |
const message& operator=(const message& p)
|
a noticed that the lists contained in the lval are never cleared prior to copying the lists from the rval to them. You practically add the rval to the lval.
2. Looking at the resolve class: from what I understand you send the query to all the dns servers but parse only the first response that arrives:
| Code: |
// only decode if we haven't decoded already!
if( responseMessage.result() != dns::message::no_result )
|
I believe it would be optimal to give-up only when:
-you received an answer;
-all the dns servers responded;
-a timeout occured.
I hope you'll find my feedback helpful. Please let me know if I can help you to make this code better.
Thank you and best regards,
Andrei