Xceed .NET Libraries Documentation
LocalDataAddress Property (FtpClient)


Xceed.Ftp Assembly > Xceed.Ftp Namespace > FtpClient Class : LocalDataAddress Property
Gets or sets the IP address and port of the client-side data connection to use in subsequent data connections. If PassiveTransfer is false, this property represents the address of the client-side listening socket waiting for the server’s data connection request.
Syntax
'Declaration
 
Public Property LocalDataAddress As IPEndPoint
'Usage
 
Dim instance As FtpClient
Dim value As IPEndPoint
 
instance.LocalDataAddress = value
 
value = instance.LocalDataAddress
public IPEndPoint LocalDataAddress {get; set;}

Property Value

If a null reference (Nothing in Visual Basic), LocalAddress.Address + random port (0) will be used. If LocalAddress.Address is IPAddress.Any, LocalAddress.Address + LocalDataAddress.Port will be used.
Remarks

Normally this property can be ignored, however if your client machine has more than one network card, the IP address of the card to use can be specified via this property. IPAddress.Any (default) can also be used to let the operating system decide which network card to use.

The IP address of the FTP client can be retreived via the System.Net.IPEndPoint.Address property while the port can be retrieved via the System.Net.IPEndPoint.Port property.

Setting this property when already connected only affects the next connection.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FtpClient Class
FtpClient Members