Photon Fusion
2.1.1
Represents a Network Address, which includes a IP and Port This can contains either a IPv4 or a IPv6 address. More...
Classes | |
| class | EqualityComparer |
| Provides methods to compare two NetAddress instances for equality. More... | |
Public Member Functions | |
| readonly bool | Equals (NetAddress other) |
| Determines whether the specified NetAddress instances are equal. | |
| override readonly bool | Equals (object obj) |
| Determines whether the specified NetAddress is equal to the current NetAddress. | |
| override readonly int | GetHashCode () |
| Returns a hash code for this instance. | |
| override readonly string | ToString () |
| Provides a string representation of the NetAddress. | |
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. | |
| 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 bool | IsPrivateIp (NetAddress netAddress) |
| Check if a provided address is private. | |
| 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. | |
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 |
|
static |
Build a new NetAddress based on an ActorId.
| actorId | ActorId used to build the NetAddress |
ActorId must be 0 or greater
|
static |
Check if a provided address is private.
| netAddress |
|
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 |