v1.0.0
Latest
2022.3+

Class Allocation

The details of an allocation to a Relay server.

Inheritance
System.Object
Allocation
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Unity.Services.Relay.Models
Syntax
public class Allocation

Constructors

Allocation(Guid, List<RelayServerEndpoint>, RelayServer, Byte[], Byte[], Byte[], String)

The details of an allocation to a Relay server.

Declaration
public Allocation(Guid allocationId, List<RelayServerEndpoint> serverEndpoints, RelayServer relayServer, byte[] key, byte[] connectionData, byte[] allocationIdBytes, string region)
Parameters
TypeNameDescription
System.GuidallocationId

The unique ID of the allocation.

System.Collections.Generic.List<RelayServerEndpoint>serverEndpoints

Connection endpoints for the assigned Relay server. > Note: The order of server endpoints is not guaranteed and users should iterate over the items and look for the desired values.

RelayServerrelayServer

relayServer param

System.Byte[]key

A base64-encoded key required for the HMAC signature of the BIND message.

System.Byte[]connectionData

A base64-encoded representation of an encrypted connection data blob describing this allocation. This data is equired for establishing communication with other players.

System.Byte[]allocationIdBytes

A base64-encoded form of the allocation ID. When decoded, this is the exact expected byte alignment to use when crafting Relay protocol messages that require the allocation ID. For example, PING, CONNECT, RELAY, and CLOSE message types.

System.Stringregion

The allocation region.

Properties

AllocationId

The unique ID of the allocation.

Declaration
public Guid AllocationId { get; }
Property Value
TypeDescription
System.Guid

AllocationIdBytes

A base64-encoded form of the allocation ID. When decoded, this is the exact expected byte alignment to use when crafting Relay protocol messages that require the allocation ID. For example, PING, CONNECT, RELAY, and CLOSE message types.

Declaration
public byte[] AllocationIdBytes { get; }
Property Value
TypeDescription
System.Byte[]

ConnectionData

A base64-encoded representation of an encrypted connection data blob describing this allocation. This data is equired for establishing communication with other players.

Declaration
public byte[] ConnectionData { get; }
Property Value
TypeDescription
System.Byte[]

Key

A base64-encoded key required for the HMAC signature of the BIND message.

Declaration
public byte[] Key { get; }
Property Value
TypeDescription
System.Byte[]

Region

The allocation region.

Declaration
public string Region { get; }
Property Value
TypeDescription
System.String

RelayServer

Parameter relayServer of Allocation

Declaration
public RelayServer RelayServer { get; }
Property Value
TypeDescription
RelayServer

ServerEndpoints

Connection endpoints for the assigned Relay server. > Note: The order of server endpoints is not guaranteed and users should iterate over the items and look for the desired values.

Declaration
public List<RelayServerEndpoint> ServerEndpoints { get; }
Property Value
TypeDescription
System.Collections.Generic.List<RelayServerEndpoint>

Extension Methods