Represents a Network Address, which includes a IP and Port This can contains either a IPv4 or a IPv6 address.
More...
Inherits IEquatable< NetAddress >.
|
bool | Equals (NetAddress other) |
|
override bool | Equals (object obj) |
|
override int | GetHashCode () |
|
override string | ToString () |
|
|
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.
|
|
static NetAddress | AnyIPv6 (ushort port=0) |
| Create a new NetAddress using the "Any" IPv6 Address representation (::) with the Port passed as argument.
|
|
static NetAddress | CreateFromIpPort (string ip, ushort port) |
| Create a new NetAddress based on the IP and Port passed as argument.
|
|
static NetAddress | FromActorId (int actorId) |
| Build a new NetAddress based on an ActorId.
|
|
static NetAddress | LocalhostIPv4 (ushort port=0) |
| Create a new NetAddress on the LocalHost address with the desired Port.
|
|
static NetAddress | LocalhostIPv6 (ushort port=0) |
| Create a new NetAddress on the LocalHost IPv6 Address with the desired Port.
|
|
|
int | ActorId [get] |
| Retrieves the Remote Actor ID which this NetAddress Represents.
|
|
bool | IsIPv6 [get] |
| Signal if the NetAddress represents an IPv6 Address.
|
|
bool | IsRelayAddr [get] |
| Signal if the NetAddress is a Relayed connection.
|
|
bool | IsValid [get] |
| Signal if this NetAddress is not default/empty.
|
|
Represents a Network Address, which includes a IP and Port This can contains either a IPv4 or a IPv6 address.
◆ Any()
Create a new NetAddress using the "Any" IPv4 Address representation (0.0.0.0) with the Port passed as argument.
- Parameters
-
port | Port used to build the NetAddress |
- Returns
- New NetAddress reference
◆ AnyIPv6()
Create a new NetAddress using the "Any" IPv6 Address representation (::) with the Port passed as argument.
- Parameters
-
port | Port used to build the NetAddress |
- Returns
- New NetAddress reference
◆ CreateFromIpPort()
static NetAddress CreateFromIpPort |
( |
string |
ip, |
|
|
ushort |
port |
|
) |
| |
|
static |
Create a new NetAddress based on the IP and Port passed as argument.
- Parameters
-
ip | String representation of an IP, either IPv4 or IPv6 |
port | Port used to build the NetAddress |
- Returns
- New NetAddress reference
- Exceptions
-
ArgumentException | If IP is empty/null or an invalid IP, or port < 0 |
AssertException | If unable to parse IP |
◆ FromActorId()
Build a new NetAddress based on an ActorId.
- Parameters
-
actorId | ActorId used to build the NetAddress |
- Returns
- Relay NetAddress that references the ActorId
ActorId must be 0 or greated
◆ LocalhostIPv4()
static NetAddress LocalhostIPv4 |
( |
ushort |
port = 0 | ) |
|
|
static |
Create a new NetAddress on the LocalHost address with the desired Port.
- Parameters
-
port | Port used to build the NetAddress |
- Returns
- New NetAddress reference
◆ LocalhostIPv6()
static NetAddress LocalhostIPv6 |
( |
ushort |
port = 0 | ) |
|
|
static |
Create a new NetAddress on the LocalHost IPv6 Address with the desired Port.
- Parameters
-
port | Port used to build the NetAddress |
- Returns
- New NetAddress reference