Vixen
02b45cc4
csharp
public record class TransferTicket

A player's permission to be admitted somewhere. Signed, expiring, opaque to them.

Read the guide page for this →

Remarks

ADR-020: NetworkSession's reconnect token with a different issuer. Doc 16 already established server-issued, opaque, expiring tokens that let a PlayerId survive a dropped ConnectionId; this is the same object minted by the orchestrator instead of by the source session, naming the target shard, the player, the lease epoch and an expiry, signed with a cluster key the realms hold and the client does not.

⚠ The client is a courier. It carries the ticket from the gate (or from the realm it is leaving) to the realm it is entering, and it can neither read anything it did not already know nor forge one. Everything a ticket authorises is checked by the realm that receives it, against a key the client has never seen.

LeaseEpoch is what makes a replayed ticket harmless (ADR-021): admission names an epoch, and an epoch already superseded is a no-op rather than a second grant. The expiry is a second, cruder bound on the same window.

Fields and properties (6)

  • public PlayerKey Player

    Who it admits.

  • public ShardId Target

    Which shard it admits them to.

  • public RealmEndpoint Endpoint

    Where that shard is, so the client needs nothing else to reach it.

  • public long LeaseEpoch

    The lease epoch the receiving realm will acquire. Monotonic per player.

  • public DateTimeOffset Expires

    When it stops being accepted.

  • public ReadOnlyMemory<byte> Signature

    The cluster key's HMAC over everything above. Empty until signed.

Methods (5)

  • public string Encode()

    The ticket as the one string a client carries.

  • public static bool TryDecode(string? text, out TransferTicket? ticket, out string error)

    Reads a ticket back, or says what was wrong with it.

  • public bool Equals(TransferTicket? other)

    Whether two tickets say the same thing, signature bytes included.

  • public override int GetHashCode()

    Serves as the default hash function.

  • public override string ToString()

    Returns a string that represents the current object.

Used by (17)

  • ArrivalVixen.Live.Transfer
  • ArrivalTestsVixen.Live.Transfer.Tests
  • FlightVixen.Live.Realm.Tests
  • GateServiceVixen.Live.Gate
  • GateServiceTestsVixen.Live.Gate.Tests
  • PlayerAdmissionVixen.Live.Realm
  • RealmClusterTestsVixen.Live.Realm.Cluster.Tests
  • RealmFixtureVixen.Live.Realm.Tests
  • RealmHostTestsVixen.Live.Realm.Tests
  • RealmTransfersVixen.Live.Realm
  • SourceTransferVixen.Live.Transfer
  • SourceTransferTestsVixen.Live.Transfer.Tests
  • TransferBoardVixen.Live.Transfer
  • TransferFleetVixen.Live.Realm.Tests
  • TransferMetricsTestsVixen.Live.Transfer.Tests
  • TransferTicketSignerVixen.Live.Abstractions
  • TransferTicketTestsVixen.Live.Abstractions.Tests