Class MatchAllocation

Namespace
Unity.Multiplayer.Core

A server an IMatchAllocator stood up for one match: where a client joins it (Endpoint, also reachable through Code) and the provider's own id for it, which ReleaseAsync(MatchAllocation, CancellationToken) needs back once the match ends.

public sealed class MatchAllocation
Inheritance
MatchAllocation
Inherited Members

Constructors

MatchAllocation(string, JoinTarget, JoinCode)

Creates an allocation result.

public MatchAllocation(string allocationId, JoinTarget endpoint, JoinCode code)

Parameters

allocationId string
endpoint JoinTarget
code JoinCode

Exceptions

ArgumentException

allocationId is empty, or code is empty.

ArgumentNullException

endpoint is null.

Properties

AllocationId

The provider's own id for this deployment/session (an Edgegap request_id, a Gameye session id, ...).

public string AllocationId { get; }

Property Value

string

Code

The join code published for Endpoint, to hand a player instead of a raw address.

public JoinCode Code { get; }

Property Value

JoinCode

Endpoint

Where the allocated server is reachable; joined directly with the adapter's NetSession, or by Code.

public JoinTarget Endpoint { get; }

Property Value

JoinTarget

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.