.NET (C#) SDK — Room Updates

Room updates are the reliable event lane: submit named actions, then poll for broadcasts and pending requests. Keep the returned cursor so each client sees every update exactly once, across reconnects.

Room Updates

UpdatePlayersAsync
public Task<UpdatePlayersResponse> UpdatePlayersAsync<T>(string gamePlayerToken,
    UpdatePlayers<T> request,
    CancellationToken ct = default)

Sends updates to specific players or all players in the room with typed data support.

PollUpdatesAsync
public Task<PollUpdatesResponse<T>> PollUpdatesAsync<T>(string gamePlayerToken,
    PollUpdates request,
    CancellationToken ct = default)

Polls for updates from specific source players with typed data support. Use PollUpdates request object to specify from_players, from_players_ids, and last_update.

Durable per-player room state

Room updates are the durable state lane: send writes a typed update — position, loadout, ready flag, board state — addressed to a target set, and it persists for late joiners instead of evaporating like an ephemeral message. Latest value wins: write the current state, not a history.

Poll reads updates since the last cursor you stored, optionally filtered by source players. Keep the returned cursor per client so every update is delivered exactly once — across reconnects and rejoins, which is what makes the lane reliable.

  • Updates for durable state, actions for requests that need answers, realtime for high-frequency ephemeral events.
  • Keep payloads small and typed — every member polls them on a cadence.
  • Store the cursor client-side; restarting from zero replays the whole room history.
  • Methods are Task-based async — await them and pass a CancellationToken tied to your game's lifetime so in-flight requests cancel cleanly on shutdown.