Class JoinAllocation
An allocation created via a join code.
Inheritance
Inherited Members
Namespace: Unity.Services.Relay.Models
Syntax
public class JoinAllocation
Constructors
JoinAllocation(Guid, List<RelayServerEndpoint>, RelayServer, Byte[], Byte[], Byte[], String, Byte[])
An allocation created via a join code.
Declaration
public JoinAllocation(Guid allocationId, List<RelayServerEndpoint> serverEndpoints, RelayServer relayServer, byte[] key, byte[] connectionData, byte[] allocationIdBytes, string region, byte[] hostConnectionData)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | allocationId | 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. |
RelayServer | relayServer | relayServer param |
System.Byte[] | key | A base64-encoded key required for the HMAC signature of the |
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, |
System.String | region | The allocation region. |
System.Byte[] | hostConnectionData | A base64-encoded representation of an encrypted connection data blob describing the allocation and Relay server of the player who created the join code. Connecting players can use this data to establish communication with the host player. |
Properties
AllocationId
The unique ID of the allocation.
Declaration
public Guid AllocationId { get; }
Property Value
Type | Description |
---|---|
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
Type | Description |
---|---|
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
Type | Description |
---|---|
System.Byte[] |
HostConnectionData
A base64-encoded representation of an encrypted connection data blob describing the allocation and Relay server of the player who created the join code. Connecting players can use this data to establish communication with the host player.
Declaration
public byte[] HostConnectionData { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Key
A base64-encoded key required for the HMAC signature of the BIND
message.
Declaration
public byte[] Key { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Region
The allocation region.
Declaration
public string Region { get; }
Property Value
Type | Description |
---|---|
System.String |
RelayServer
Parameter relayServer of JoinAllocation
Declaration
public RelayServer RelayServer { get; }
Property Value
Type | Description |
---|---|
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
Type | Description |
---|---|
System.Collections.Generic.List<RelayServerEndpoint> |