docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Allocation

    The details of an allocation to a Relay server.

    Inheritance
    object
    Allocation
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Services.Apis.Relay
    Assembly: solution.dll
    Syntax
    [Preserve]
    public class Allocation

    Constructors

    Allocation(string, List<RelayServerEndpoint>, RelayServer, byte[], byte[], byte[], string)

    Initializes a new instance of the Allocation class.

    Declaration
    [Preserve]
    public Allocation(string allocationId = null, List<RelayServerEndpoint> serverEndpoints = null, RelayServer relayServer = null, byte[] key = null, byte[] connectionData = null, byte[] allocationIdBytes = null, string region = null)
    Parameters
    Type Name Description
    string allocationId

    The unique ID of the allocation. (required).

    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. (required).

    RelayServer relayServer

    relayServer (required).

    byte[] key

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

    byte[] connectionData

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

    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. (required).

    string region

    The allocation region. (required).

    Properties

    AllocationId

    The unique ID of the allocation.

    Declaration
    [Preserve]
    public string AllocationId { get; set; }
    Property Value
    Type Description
    string

    The unique ID of the allocation.

    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
    [Preserve]
    public byte[] AllocationIdBytes { get; set; }
    Property Value
    Type Description
    byte[]

    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.

    ConnectionData

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

    Declaration
    [Preserve]
    public byte[] ConnectionData { get; set; }
    Property Value
    Type Description
    byte[]

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

    Key

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

    Declaration
    [Preserve]
    public byte[] Key { get; set; }
    Property Value
    Type Description
    byte[]

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

    Region

    The allocation region.

    Declaration
    [Preserve]
    public string Region { get; set; }
    Property Value
    Type Description
    string

    The allocation region.

    RelayServer

    Gets or Sets RelayServer

    Declaration
    [Obsolete]
    [Preserve]
    public RelayServer RelayServer { get; set; }
    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
    [Preserve]
    public List<RelayServerEndpoint> ServerEndpoints { get; set; }
    Property Value
    Type Description
    List<RelayServerEndpoint>

    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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)