Struct NetworkEndPoint
Describes a raw network endpoint (typically IP and port number).
Inherited Members
Namespace: Unity.Networking.Transport
Assembly: solution.dll
Syntax
public struct NetworkEndPoint
Properties
| Name | Description |
|---|---|
| Address | Gets the endpoint's representation as a string. |
| AnyIpv4 | Gets an IPv4 endpoint that can be used to bind to any address available (0.0.0.0:0). |
| AnyIpv6 | Gets an IPv6 endpoint that can be used to bind to any address available ([::0]:0). |
| Family | Gets or sets NetworkFamily of the endpoint. |
| IsAny | Whether the endpoint is using an "any" address. |
| IsLoopback | Whether the endpoint is using a loopback address. |
| IsValid | Whether the endpoint is valid or not. |
| Length | Returns the length of the raw network endpoint in bytes. |
| LoopbackIpv4 | Gets an IPv4 loopback endpoint (127.0.0.1:0). |
| LoopbackIpv6 | Gets an IPv6 loopback endpoint ([::1]:0). |
| Port | Gets or sets port number of the endpoint. |
| RawPort | Gets or sets the value of the raw port number. |
Methods
| Name | Description |
|---|---|
| Equals(object) | Indicates whether this instance and a specified object are equal. |
| GetHashCode() | Returns the hash code for this instance. |
| GetRawAddressBytes() | Gets the raw bytes for the endpoint. |
| Parse(string, ushort, NetworkFamily) | Same as TryParse<T>, except an endpoint is always returned. If the given address, port, and family don't represent a valid endpoint, the default one is returned. |
| SetRawAddressBytes(NativeArray<byte>, NetworkFamily) | Directly sets the raw bytes of the endpoint using the specified bytes and family. |
| ToString() | Returns the fully qualified type name of this instance. |
| TryParse(string, ushort, out NetworkEndPoint, NetworkFamily) | Try to parse the given address and port into a new NetworkEndPoint. |
| WithPort(ushort) | Use the given port number for this endpoint. |
Operators
| Name | Description |
|---|---|
| operator ==(NetworkEndPoint, NetworkEndPoint) | |
| operator !=(NetworkEndPoint, NetworkEndPoint) |