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
allocationIdstringendpointJoinTargetcodeJoinCode
Exceptions
- ArgumentException
allocationIdis empty, orcodeis empty.- ArgumentNullException
endpointis 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
Code
The join code published for Endpoint, to hand a player instead of a raw address.
public JoinCode Code { get; }
Property Value
Endpoint
Where the allocated server is reachable; joined directly with the adapter's NetSession, or by Code.
public JoinTarget Endpoint { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.