dig can do tcp mode query. just use: dig xxx +tcp.
 

baobeileaf
 
From: Juan Orti Alcaine
Date: 2013-11-04 15:51
To: baobeileaf; KDE on Fedora discussion
Subject: Re: why dig (tcp) is much faster than wget(gethostbyname?) ?
El 2013-11-04 08:08, baobeileaf escribió:
 
> I've read the sourcecode of wget. Maybe the difference comes from
> gethostbyname.
> Anyone can help me? or tell me where's the sourcecode of
> gethostbyname.
> Much Thx.
 
I don't understand what are you trying to do.
dig only do a DNS query, and wget a DNS query + TCP handshake + HTTP 
conversation.