Xceed .NET Libraries Documentation
LocalAddress Property (FtpClient)


Xceed.Ftp Assembly > Xceed.Ftp Namespace > FtpClient Class : LocalAddress Property
Gets or sets the local IP address and port from which the FTP client is connected.
Syntax
'Declaration
 
Public Property LocalAddress As IPEndPoint
'Usage
 
Dim instance As FtpClient

Dim value As IPEndPoint

 

instance.LocalAddress = value

 

value = instance.LocalAddress
public IPEndPoint LocalAddress {get; set;}

Property Value

A reference to an System.Net.IPEndPoint object representing the local IP address and port from which the FTP client is connected. If 0 (default) is specified for the port, a random port will be used. Can return a null reference (Nothing in Visual Basic) if the FTP client is not connected to an FTP server. Can be set to a null reference (Nothing in Visual Basic) (default) to use the default network adapter.
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