Represents a Network Address, which includes a IP and Port This can contains either a IPv4 or a IPv6 address More...
Inherits IEquatable< NetAddress >.
Classes | |
class | EqualityComparer |
Provides methods to compare two NetAddress instances for equality. More... | |
Public Member Functions | |
bool | Equals (NetAddress other) |
Determines whether the specified NetAddress instances are equal. More... | |
override bool | Equals (object obj) |
Determines whether the specified NetAddress is equal to the current NetAddress. More... | |
override int | GetHashCode () |
Returns a hash code for this instance. More... | |
override string | ToString () |
Provides a string representation of the NetAddress More... | |
Static Public Member Functions | |
static NetAddress | Any (ushort port=0) |
Create a new NetAddress using the "Any" IPv4 Address representation (0.0.0.0) with the Port passed as argument More... | |
static NetAddress | AnyIPv6 (ushort port=0) |
Create a new NetAddress using the "Any" IPv6 Address representation (::) with the Port passed as argument More... | |
static NetAddress | CreateFromIpPort (string ip, ushort port) |
Create a new NetAddress based on the IP and Port passed as argument More... | |
static NetAddress | FromActorId (int actorId) |
Build a new NetAddress based on an ActorId More... | |
static NetAddress | LocalhostIPv4 (ushort port=0) |
Create a new NetAddress on the LocalHost address with the desired Port More... | |
static NetAddress | LocalhostIPv6 (ushort port=0) |
Create a new NetAddress on the LocalHost IPv6 Address with the desired Port More... | |
Public Attributes | |
int | _actorId |
Properties | |
int | ActorId [get] |
Retrieves the Remote Actor ID which this NetAddress Represents More... | |
bool | HasAddress [get] |
Signal if this NetAddress has a valid IP Address More... | |
bool | IsIPv4 [get] |
Signal if the NetAddress represents an IPv4 Address More... | |
bool | IsIPv6 [get] |
Signal if the NetAddress represents an IPv6 Address More... | |
bool | IsRelayAddr [get] |
Signal if the NetAddress is a Relayed connection More... | |
bool | IsValid [get] |
Signal if this NetAddress is not default/empty More... | |
Represents a Network Address, which includes a IP and Port This can contains either a IPv4 or a IPv6 address
|
static |
Create a new NetAddress using the "Any" IPv4 Address representation (0.0.0.0) with the Port passed as argument
port | Port used to build the NetAddress |
|
static |
Create a new NetAddress using the "Any" IPv6 Address representation (::) with the Port passed as argument
port | Port used to build the NetAddress |
|
static |
Create a new NetAddress based on the IP and Port passed as argument
ip | String representation of an IP, either IPv4 or IPv6 |
port | Port used to build the NetAddress |
ArgumentException | If IP is empty/null or an invalid IP, or port < 0 |
AssertException | If unable to parse IP |
bool Equals | ( | NetAddress | other | ) |
Determines whether the specified NetAddress instances are equal.
override bool Equals | ( | object | obj | ) |
Determines whether the specified NetAddress is equal to the current NetAddress.
|
static |
Build a new NetAddress based on an ActorId
actorId | ActorId used to build the NetAddress |
ActorId must be 0 or greater
override int GetHashCode | ( | ) |
Returns a hash code for this instance.
|
static |
Create a new NetAddress on the LocalHost address with the desired Port
port | Port used to build the NetAddress |
|
static |
Create a new NetAddress on the LocalHost IPv6 Address with the desired Port
port | Port used to build the NetAddress |
override string ToString | ( | ) |
Provides a string representation of the NetAddress
|
get |
Retrieves the Remote Actor ID which this NetAddress Represents
|
get |
Signal if this NetAddress has a valid IP Address
|
get |
Signal if the NetAddress represents an IPv4 Address
|
get |
Signal if the NetAddress represents an IPv6 Address
|
get |
Signal if the NetAddress is a Relayed connection
|
get |
Signal if this NetAddress is not default/empty