---
title: TabletopNetworkSession
framework: tabletopkit
role: symbol
role_heading: Class
path: tabletopkit/tabletopnetworksession
---

# TabletopNetworkSession

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

## Declaration

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

## Overview

Overview To start a multiplayer game for a local player, use the 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() 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() and followArbiter(_:) methods. To join an existing game, use the join() method, and to pass incoming messages to the game, use the processIncomingMessage(_:from:) method. To get all the people who join the session, not just the players, use the peers property.

## Topics

### Joining multiplayer games

- [start()](tabletopkit/tabletopnetworksession/start().md)
- [join()](tabletopkit/tabletopnetworksession/join().md)
- [leave()](tabletopkit/tabletopnetworksession/leave().md)
- [terminate()](tabletopkit/tabletopnetworksession/terminate().md)

### Changing the arbiter role between players

- [becomeArbiter()](tabletopkit/tabletopnetworksession/becomearbiter().md)
- [followArbiter(_:)](tabletopkit/tabletopnetworksession/followarbiter(_:).md)

### Managing network session peers

- [peers](tabletopkit/tabletopnetworksession/peers.md)
- [addPeer(_:)](tabletopkit/tabletopnetworksession/addpeer(_:).md)
- [removePeer(_:)](tabletopkit/tabletopnetworksession/removepeer(_:).md)
- [TabletopNetworkSession.Peer](tabletopkit/tabletopnetworksession/peer.md)

### Receiving messages from peers

- [processIncomingMessage(_:from:)](tabletopkit/tabletopnetworksession/processincomingmessage(_:from:).md)
- [processIncomingUnreliableMessage(_:from:)](tabletopkit/tabletopnetworksession/processincomingunreliablemessage(_:from:).md)

## See Also

### Multiplayer network session

- [TabletopNetworkSessionCoordinator](tabletopkit/tabletopnetworksessioncoordinator.md)
- [TabletopSendMessageResult](tabletopkit/tabletopsendmessageresult.md)
