Xceed .NET Libraries Documentation
LocalAddress Property (FtpConnection)


Xceed.Ftp Assembly > Xceed.Ftp Namespace > FtpConnection Class : LocalAddress Property
Gets or sets the client-side IP address and port.
Syntax
'Declaration
 
Public Property LocalAddress As IPEndPoint
'Usage
 
Dim instance As FtpConnection
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 client-side IP address and port. If 0 (default) is specified for the port, a random port will be used. Can return a null reference (Nothing in Visual Basic) if 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 the 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 client-side IP address 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

FtpConnection Class
FtpConnection Members