Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Sep : Re: GStack
| Subject: | Re: GStack |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Wed, 27 Sep 2006 17:57:55 |
"Roberto Meneghini" <rmeneghini@separationsystems.com> wrote in message
news:451b104e@newsgroups.borland.com...
> Does it make any difference if the target application is a VCL.NET ?
Yes, that would make all of the difference.
Under .NET, Indy uses the TIdStackDotNet class. The
TIdStackDotNet.PopulateLocalAddresses() method calls the
System.Net.Dns.GetHostByAddress() method to get the address list.
However, it is passing the System.Net.IPAddress.Any property as the address
for GetHostByAddress() to resolve. IPAddress.Any is the same as '0.0.0.0'.
I do not know if GetHostByAddress('0.0.0.0') is valid in .NET, but it is
certainly not valid in Win32 and Linux. Under Win32 and Linux, Indy uses
the socket API gethostname() and gethostbyname() functions instead. Why
Indy is not using System.Net.Dns.GetHostName() and
System.Net.Dns.GetHostByName() under .NET, I do not know.
Gambit