Article View: borland.public.cppbuilder.internet.socket
Article #4023Re: Resolving Host And IP adress with indy 9?
From: qyte
Date: Wed, 27 Apr 2005 10:17
Date: Wed, 27 Apr 2005 10:17
20 lines
1805 bytes
1805 bytes
Remy Lebeau (TeamB) wrote: > You need to use the PeerIP instead: > > AnsiString IP = IdTCP->Socket->Binding->PeerIP; > AnsiString Host = GStack->WSGetHostByAddr(IP); > I have already done that and it works. another problem that i found was that if i connect the two programs from the same computer but using my internet IP address they connect and the ip address is also correct but the host is my computer name. can i solve this somehow? i haven't tried connecting to another pc yet and so i do not know if the same thing will happen in such case. I would prefer not to resolve the computer name of the peer but it's DNS.
Technical Details
Message-ID:
<426f66d2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<426f49c3@newsgroups.borland.com> <426f5e09$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f31a2c5d91adaad8 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 27 Apr 2005 13:17:52 +0300 From: qyte <gyte@vivodinet.gr> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Resolving Host And IP adress with indy 9? References: <426f49c3@newsgroups.borland.com> <426f5e09$1@newsgroups.borland.com> In-Reply-To: <426f5e09$1@newsgroups.borland.com> Content-Type: text/plain; charset=windows-1253; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 62.74.141.196 Message-ID: <426f66d2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1114597074 62.74.141.196 (27 Apr 2005 03:17:54 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail