Board index » delphi » IdTCPClient hangs the program while resolving host

IdTCPClient hangs the program while resolving host

Hi,
I've noticed that IdTCPClient hangs my form for about 2-5 seconds while
trying to resolve/connect to a local hostname. This does not happen if i'm
connected to the internet. Any ideas?

Thanks ,
Paul.

 

Re:IdTCPClient hangs the program while resolving host


"Paul B. [pbcomm, aka WPD]" <pbc...@akula.com> wrote in message
news:3ce9728e_1@dnews...

Quote
> I've noticed that IdTCPClient hangs my form for about 2-5 seconds while
> trying to resolve/connect to a local hostname. This does not happen if i'm
> connected to the internet. Any ideas?

Unless the host or IP address appears in the Hosts file on your PC, it's
trying to use your DNS server to resolve the address.  The delay is caused
by waiting for the DNS server to timeout.  If it's a local machine and the
address is not likely to change, just add it to the Hosts file to avoid a
DNS lookup.

hth...
--
Don

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

Re:IdTCPClient hangs the program while resolving host


Putting an IntiFreeze componet onto the form should stop it from{*word*154}. U
dont need to do any code for it.

"Don Siders [Team Indy]" <side...@att.net> wrote in message
news:15622F419D42E240sidersd@att.net...

Quote

> "Paul B. [pbcomm, aka WPD]" <pbc...@akula.com> wrote in message
> news:3ce9728e_1@dnews...

> > I've noticed that IdTCPClient hangs my form for about 2-5 seconds while
> > trying to resolve/connect to a local hostname. This does not happen if
i'm
> > connected to the internet. Any ideas?

> Unless the host or IP address appears in the Hosts file on your PC, it's
> trying to use your DNS server to resolve the address.  The delay is caused
> by waiting for the DNS server to timeout.  If it's a local machine and the
> address is not likely to change, just add it to the Hosts file to avoid a
> DNS lookup.

> hth...
> --
> Don

> Posted by ELKNews 1.0.4-B
> Empower your News Reader! http://www.atozedsoftware.com

Other Threads