public sealed class GateConnectionThe client's half of the service plane's socket, with the reconnect built in.
Remarks
⚠ This socket being down is a normal state, not an error state. Doc 27 is explicit that nothing a player is waiting on travels here, so a client that showed a modal when it dropped would be showing a modal for a lost whisper. It reconnects with backoff, forever, and says nothing about it.
⚠ Nothing is replayed across a reconnect, and nothing needs to be. A push is a hint to go and ask: catalog means fetch the catalog, draining means ask the gate where to play. A design that queued missed events would be a design where the queue's depth eventually matters.
Fields and properties (4)
public TimeSpan FirstBackoffHow long to wait before the first reconnection attempt.
public TimeSpan MaximumBackoffThe longest it will ever wait between attempts.
public int ConnectionsHow many times a socket has come up. A number for a diagnostics panel.
public bool ConnectedWhether a socket is up right now.
Methods (3)
public GateConnection(Uri address, GateClient gate, Func<IGateSocket>? sockets = null)Opens sockets to a gate.
public IAsyncEnumerable<GateEvent> ListenAsync(CancellationToken cancellation)Everything the gate says, across as many sockets as it takes.
public ValueTask DisposeAsync()Closes whatever is open.
Used by (1)
- GateConnectionTestsVixen.Live.Client.Tests