Topic Path: Symbol Reference > Classes > TIdStack Class > TIdStack Methods > GetPeerName Method
TIdStack.GetPeerName Method

Retrieves the destination for a remote network connection.

procedure GetPeerName(
    ASocket: TIdStackSocketHandle; 
    var VIP: string; 
    var VPort: Integer
); virtual; abstract;
Socket handle for the operation.
IP address for the remote network connection.
Port number for the remote network connection. 

GetPeerName is an abstract virtual method used to access the GetPeerName() API for a protocol stack implementation. 

GetPeerName retrieves the identity for the connection destination. The IP address and Port number for the remote network connection are returned in VIP and VPort. 

GetPeerName can only be used on a socket handle after a call to Connect. If SendTo is used on a datagram socket, the value for GetPeerName is not available.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.