---
title: sessionMode
framework: gamekit
role: symbol
role_heading: Instance Property
path: gamekit/gksession/sessionmode
---

# sessionMode

The mode the session uses to find other peers.

## Declaration

```swift
var sessionMode: GKSessionMode { get }
```

## Discussion

Discussion The session mode changes the behavior of the session when isAvailable is set to true. A GKSessionMode.server session advertises itself to local devices using its session ID. A GKSessionMode.client session searches for local devices advertising the same session ID. As it discovers available and compatible peers, it calls the delegate’s  session(_:peer:didChange:) method. A GKSessionMode.peer session both advertises as a server and searches as a client.

## See Also

### Related Documentation

- [isAvailable](gamekit/gksession/isavailable.md)

### Information about the Session

- [displayName](gamekit/gksession/displayname.md)
- [peerID](gamekit/gksession/peerid.md)
- [sessionID](gamekit/gksession/sessionid.md)
