Class Address
Abstraction for an IP address.
Inherited Members
Namespace: FubarDev.FtpServer
Assembly: FubarDev.FtpServer.Abstractions.dll
Syntax
[Obsolete("Use IPEndPoint instead")]
public class Address
Constructors
| Improve this Doc View SourceAddress(Int32)
Initializes a new instance of the Address class.
Declaration
public Address(int port)
Parameters
Type | Name | Description |
---|---|---|
Int32 | port | The port. |
Remarks
This constructor omits the address part.
Address(Nullable<String>, Int32)
Initializes a new instance of the Address class.
Declaration
public Address(string? address, int port)
Parameters
Type | Name | Description |
---|---|---|
Nullable<String> | address | IPv4 address. |
Int32 | port | The port. |
Properties
| Improve this Doc View SourceAddressFamily
Gets the IP address family.
Declaration
public AddressFamily? AddressFamily { get; }
Property Value
Type | Description |
---|---|
Nullable<AddressFamily> |
IPAddress
Gets the IP address.
Declaration
public IPAddress? IPAddress { get; }
Property Value
Type | Description |
---|---|
Nullable<IPAddress> |
Port
Gets the port.
Declaration
public int Port { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceParse(Nullable<String>)
Parses an IP address.
Declaration
public static Address? Parse(string? address)
Parameters
Type | Name | Description |
---|---|---|
Nullable<String> | address | The IP address to parse. |
Returns
Type | Description |
---|---|
Nullable<Address> | The parsed IP address. |
ToString()
Converts the IP address to a string as required by the PASV command.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | The IP address as string. |
Overrides
| Improve this Doc View SourceToString(Boolean)
Converts the IP address into a string.
Declaration
public string ToString(bool logFormat)
Parameters
Type | Name | Description |
---|---|---|
Boolean | logFormat | when it should be converted to a loggable format, otherwise the FTP format is used.
|
Returns
Type | Description |
---|---|
String | The IP address as string. |
ToUri()
Converts this address to an URI.
Declaration
public Uri ToUri()
Returns
Type | Description |
---|---|
Uri | The newly created URI. |