Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Nov : Re: Indy9 DNS property?

www.cryer.info
Managed Newsgroup Archive

Re: Indy9 DNS property?

Subject:Re: Indy9 DNS property?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Mon, 26 Nov 2007 15:41:53

"Jamie Dale" <jamie.dale@yahoo.com> wrote in message
news:474b3f90$1@newsgroups.borland.com...

> I can find localname and peerip, but nothing dns related.

If you are looking for the client's remote name, you have to perform a
reverse DNS lookup on its IP, ie:

    procedure TForm1.IdTCPServer1Connect(AThread: TIdPeerThread);
    var
        PeerName: String;
    begin
        PeerName :=
GStack.WSGetHostByAddr(AThread.Connection.Socket.Binding.PeerIP);
        //...
    end;


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive