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

Retrieves the destination for a remote network connection.

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

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

GetPeerName retrieves the identity for the connection destination using an IPEndPoint for the remote network connection. VIP and VPort are updated to reflect the values found in the IPEndPoint. 

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. 

Exceptions occuring in the method are re-raised using either the EIdSocketError or EIdWrapperException exception types.

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