🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4020

Re: Resolving Host And IP adress with indy 9?

#4020
From: Remy Lebeau (TeamB)
Date: Wed, 27 Apr 2005 09:42
19 lines
1453 bytes
"qyte" <gyte@vivodinet.gr> wrote in message
news:426f49c3@newsgroups.borland.com...

> is there a way of finding out both RemoteHost and
> RemoteAddress of the other side of the peer?

Yes.

> I found that IdTCP->Socket->binding->IP
> gets either the ip address or the host.

You need to use the PeerIP instead:

    AnsiString IP = IdTCP->Socket->Binding->PeerIP;
    AnsiString Host = GStack->WSGetHostByAddr(IP);


Gambit
Technical Details
Message-ID: <426f5e09$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.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
References: <426f49c3@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
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <426f49c3@newsgroups.borland.com>
Subject: Re: Resolving Host And IP adress with indy 9?
Date: Wed, 27 Apr 2005 02:42:48 -0700
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <426f5e09$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1114594825 68.69.17.41 (27 Apr 2005 02:40:25 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.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