feat(battle-node): add RealParticipant.Phase for per-side handshake state
Internal setter; defaults to AwaitingInitNetwork. PvP needs A and B to progress through the handshake states independently, which the session-level BattleSession.Phase can't model. Session migration to read realFrom.Phase is the next task.
This commit is contained in:
@@ -28,6 +28,13 @@ public sealed class RealParticipant : IBattleParticipant
|
||||
public InboundTracker Inbound { get; } = new();
|
||||
public OutboundSequencer Outbound { get; } = new();
|
||||
|
||||
/// <summary>Per-side handshake progression. Session reads this when gating
|
||||
/// handshake-phase synthesis (Matched / BattleStart / Deal / Swap response /
|
||||
/// Ready). Session transitions via the setter after dispatch. Defaults to
|
||||
/// AwaitingInitNetwork; only RealParticipant tracks this — bots have no phase
|
||||
/// because they never send the gating URIs.</summary>
|
||||
internal BattleSessionPhase Phase { get; set; } = BattleSessionPhase.AwaitingInitNetwork;
|
||||
|
||||
public event Func<MsgEnvelope, CancellationToken, Task>? FrameEmitted;
|
||||
|
||||
public RealParticipant(WebSocket ws, long viewerId, MatchContext context,
|
||||
|
||||
Reference in New Issue
Block a user