Skip to main content

Unity.Networking.Transport.Relay.RelayAllocationId

Allocation Id is a unique identifier for a connected client/host to a Relay server. This identifier is used by the Relay protocol as the address of the client.

Implements#

System.IEquatable\<RelayAllocationId>

System.IComparable\<RelayAllocationId>

Inherited Members#

ValueType.ToString()

Object.Equals(Object, Object)

Object.GetType()

Object.ReferenceEquals(Object, Object)

Namespace: System.Dynamic.ExpandoObject#
Assembly: transport.dll#
Syntax#
public struct RelayAllocationId : IEquatable<RelayAllocationId>, IComparable<RelayAllocationId>

k_Length#

The length in bytes of the Allocation Id.

Declaration#

public const int k_Length = 16

Field Value#

TypeDescription
System.Int32

Value#

The raw data of the Allocation Id.

Declaration#

public byte *Value

Field Value#

TypeDescription
System.Byte*

#

CompareTo(RelayAllocationId)#

Declaration#

public int CompareTo(RelayAllocationId other)

Parameters#

TypeNameDescription
RelayAllocationIdother

Returns#

TypeDescription
System.Int32

Equals(Object)#

Declaration#

public override bool Equals(object other)

Parameters#

TypeNameDescription
System.Objectother

Returns#

TypeDescription
System.Boolean

Overrides#

System.ValueType.Equals(System.Object)

Equals(RelayAllocationId)#

Declaration#

public bool Equals(RelayAllocationId other)

Parameters#

TypeNameDescription
RelayAllocationIdother

Returns#

TypeDescription
System.Boolean

FromBytePointer(Byte*, Int32)#

Converts a byte pointer to a RelayAllocationId.

Declaration#

public static RelayAllocationId FromBytePointer(byte *dataPtr, int length)

Parameters#

TypeNameDescription
System.Byte*dataPtrThe pointer to the data of the Allocation Id.
System.Int32lengthThe length of the data.

Returns#

TypeDescription
RelayAllocationIdReturns a RelayAllocationId constructed from the provided data.

Exceptions#

TypeCondition
System.ArgumentExceptionProvided byte array length is invalid, must be {k_Length} but got {length}.

GetHashCode()#

Declaration#

public override int GetHashCode()

Returns#

TypeDescription
System.Int32

Overrides#

System.ValueType.GetHashCode()

#

Equality(RelayAllocationId, RelayAllocationId)#

Declaration#

public static bool operator ==(RelayAllocationId lhs, RelayAllocationId rhs)

Parameters#

TypeNameDescription
RelayAllocationIdlhs
RelayAllocationIdrhs

Returns#

TypeDescription
System.Boolean

Inequality(RelayAllocationId, RelayAllocationId)#

Declaration#

public static bool operator !=(RelayAllocationId lhs, RelayAllocationId rhs)

Parameters#

TypeNameDescription
RelayAllocationIdlhs
RelayAllocationIdrhs

Returns#

TypeDescription
System.Boolean

Implements#

System.IEquatable\<T>

System.IComparable\<T>