feat(emulated-entrypoint): InProcessPairUp service for TK2 PvP matching
Tiny per-mode FCFS slot. First poller parks; second pairs and triggers bridge.RegisterBattle(p1, p2, Pvp). Match cached for first poller's next poll (consume-on-read). No MMR, no cross-mode, no timeouts -- the proper queue API is a separate spec; this is the smallest thing that lets TK2 PvP work end-to-end.
This commit is contained in:
20
SVSim.EmulatedEntrypoint/Matching/IMatchingPairUpService.cs
Normal file
20
SVSim.EmulatedEntrypoint/Matching/IMatchingPairUpService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using SVSim.BattleNode.Bridge;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Matching;
|
||||
|
||||
/// <summary>
|
||||
/// Minimal in-process matching queue stand-in. The proper queue API is a separate
|
||||
/// spec; this is enough to actually pair two viewers polling /do_matching on the
|
||||
/// same mode.
|
||||
/// </summary>
|
||||
public interface IMatchingPairUpService
|
||||
{
|
||||
/// <summary>
|
||||
/// Try to pair the calling viewer with an already-waiting partner.
|
||||
/// Returns the resolved <see cref="PendingMatch"/> when a partner was found
|
||||
/// (either this call paired with a waiter, or a previous pairing's result is
|
||||
/// still cached for this viewer). Returns null if this viewer is the first
|
||||
/// arriver and should be parked (caller returns 3001 RETRY).
|
||||
/// </summary>
|
||||
Task<PendingMatch?> TryPairAsync(string mode, BattlePlayer player, CancellationToken ct);
|
||||
}
|
||||
Reference in New Issue
Block a user