<!--
{
  "availability" : [
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabletopKit",
  "identifier" : "/documentation/TabletopKit/TabletopNetworkSession",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "TabletopKit"
    ],
    "preciseIdentifier" : "s:11TabletopKit0A14NetworkSessionC"
  },
  "title" : "TabletopNetworkSession"
}
-->

# TabletopNetworkSession

An object that coordinates network-related tasks in multiplayer games.

```
class TabletopNetworkSession<Coordinator> where Coordinator : TabletopNetworkSessionCoordinator
```

## Overview

To start a multiplayer game for a local player, use the [`start()`](/documentation/TabletopKit/TabletopNetworkSession/start()) method. TabletopKit syncs the current table state between all peers in the session, so update the table state before invoking this method.

After invoking the [`start()`](/documentation/TabletopKit/TabletopNetworkSession/start()) method, the local player becomes the arbiter who ensures that TabletopKit applies actions in order for all players. To switch the arbiter role between players, use the [`becomeArbiter()`](/documentation/TabletopKit/TabletopNetworkSession/becomeArbiter()) and [`followArbiter(_:)`](/documentation/TabletopKit/TabletopNetworkSession/followArbiter(_:)) methods.

To join an existing game, use the [`join()`](/documentation/TabletopKit/TabletopNetworkSession/join()) method, and to pass incoming messages to the game, use the [`processIncomingMessage(_:from:)`](/documentation/TabletopKit/TabletopNetworkSession/processIncomingMessage(_:from:)) method.

To get all the people who join the session, not just the players, use the [`peers`](/documentation/TabletopKit/TabletopNetworkSession/peers) property.

## Topics

### Joining multiplayer games

[`start()`](/documentation/TabletopKit/TabletopNetworkSession/start())

Start a new multiplayer game, promoting the local state of the table to all connected peers

[`join()`](/documentation/TabletopKit/TabletopNetworkSession/join())

Join an existing game started between the connected peers

[`leave()`](/documentation/TabletopKit/TabletopNetworkSession/leave())

Leave the current multiplayer game

[`terminate()`](/documentation/TabletopKit/TabletopNetworkSession/terminate())

### Changing the arbiter role between players

[`becomeArbiter()`](/documentation/TabletopKit/TabletopNetworkSession/becomeArbiter())

[`followArbiter(_:)`](/documentation/TabletopKit/TabletopNetworkSession/followArbiter(_:))

### Managing network session peers

[`peers`](/documentation/TabletopKit/TabletopNetworkSession/peers)

The set of peers known by the game

[`addPeer(_:)`](/documentation/TabletopKit/TabletopNetworkSession/addPeer(_:))

Notify the game that a new peer has connected

[`removePeer(_:)`](/documentation/TabletopKit/TabletopNetworkSession/removePeer(_:))

Notify the game that an existing peer disconnected

[`Peer`](/documentation/TabletopKit/TabletopNetworkSession/Peer)

### Receiving messages from peers

[`processIncomingMessage(_:from:)`](/documentation/TabletopKit/TabletopNetworkSession/processIncomingMessage(_:from:))

Pass incoming messages from the reliable channel to the game.

[`processIncomingUnreliableMessage(_:from:)`](/documentation/TabletopKit/TabletopNetworkSession/processIncomingUnreliableMessage(_:from:))

Pass incoming messages from the unreliable channel to the game.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)