Vixen
02b45cc4
csharp
public sealed class PlayerAdmission

The door: a ticket, a capacity check, and a name to hold the session's player against.

Read the guide page for this →

Remarks

An ISessionAuthenticator, which is doc 16's existing seam and needs no new mechanism: the session hands over whatever the client sent at the handshake, and this decides. What arrives is an encoded TransferTicket; what comes back is accept-as-somebody or a named refusal.

⚠ Synchronous, and it has to stay that way. The interface allows Pending for an authenticator that has to ask an identity provider — and this one never does, because the ticket is self-contained and the key is already here. That is the property ADR-020 was designed for: admission costs an HMAC, so a transfer's second session opens in the time it takes to hash a hundred bytes rather than in a round trip to the orchestrator.

Fields and properties (6)

  • public Func<DateTimeOffset> Now

    The realm's clock, for expiry. Replaceable so a test does not have to wait.

  • public bool IsDraining

    Whether the shard is taking arrivals.

  • public int Count

    How many are here.

  • public IReadOnlyCollection<RealmPlayer> Players

    Everybody here.

  • public AdmissionRefusal LastRefusal

    Why the last refusal happened, for the heartbeat and the log.

  • public IReadOnlyDictionary<AdmissionRefusal, int> Refusals

    How many have been turned away, by reason.

Methods (6)

Used by (2)

  • RealmHostVixen.Live.Realm
  • RealmHostTestsVixen.Live.Realm.Tests