Internet Direct (Indy)
Home
PreviousUpNext
TIdStackDotNet.GetPeerName Method

Retrieves the destination for a remote network connection.

Pascal
procedure GetPeerName(
    ASocket: TIdStackSocketHandle; 
    var VIP: string; 
    var VPort: Integer
); override;
Parameters 
Description 
ASocket 
Socket handle for the operation.
 
VIP 
IP address for the remote network connection.
 
VPort 
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.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.