Session hosts, clients, and servers
Understand how session handles change the permissions and capabilities available to hosts, clients, and servers.
Read time 2 minutesLast updated a day ago
Each session can be accessed through different handles, and each handle exposes the permissions and operations available to that role.
Hosts, clients, and servers
You access a session through one of three handles. Each handle is the same session viewed with a different level of authority:
Handle | Who uses it | How you get it | What it allows |
|---|---|---|---|
| Every member of the session, including the host. | Returned by create, join, and reconnect calls. | Read session data, manage your own player properties, leave, refresh, and reconnect. |
| The player who is currently the session host. | Call | Everything |
| A dedicated server or other service-owned process that manages the session. | Returned by | Everything |
AsHost()AsServer()SessionExceptionForbiddensession.IsHostsession.IsServerThese handles are the client-side view of the session's permission model. The service enforces the same rules on the data itself. For the rules about who can read and write each type of data, refer to the data access table in Session data and player data.
Servers aren't players
When a dedicated server manages a session, the server holds an handle with host-level authority, but it isn't a member of the session's player list. is on the server. For more information, refer to Game server hosting support.
IServerSessionsession.IsServertrue