---
title: GKPeerConnectionState
framework: gamekit
role: symbol
role_heading: Enumeration
path: gamekit/gkpeerconnectionstate
---

# GKPeerConnectionState

The state of a peer known to the session.

## Declaration

```swift
enum GKPeerConnectionState
```

## Overview

Overview States are not mutually exclusive. For example, a peer can be available for other peers to discover while it is attempting to connect to another peer.

## Topics

### Constants

- [GKPeerConnectionState.stateAvailable](gamekit/gkpeerconnectionstate/stateavailable.md)
- [GKPeerConnectionState.stateUnavailable](gamekit/gkpeerconnectionstate/stateunavailable.md)
- [GKPeerConnectionState.stateConnected](gamekit/gkpeerconnectionstate/stateconnected.md)
- [GKPeerConnectionState.stateDisconnected](gamekit/gkpeerconnectionstate/statedisconnected.md)
- [GKPeerConnectionState.stateConnecting](gamekit/gkpeerconnectionstate/stateconnecting.md)

### Enumeration Cases

- [GKPeerConnectionState.stateConnectedRelay](gamekit/gkpeerconnectionstate/stateconnectedrelay.md)

### Initializers

- [init(rawValue:)](gamekit/gkpeerconnectionstate/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Deprecated enumerations

- [GKGameSessionError.Code](gamekit/gkgamesessionerror/code.md)
- [GKPeerPickerConnectionType](gamekit/gkpeerpickerconnectiontype.md)
- [GKSendDataMode](gamekit/gksenddatamode.md)
- [GKSessionError.Code](gamekit/gksessionerror-swift.struct/code.md)
- [GKSessionError](gamekit/gksessionerror-swift.struct.md)
- [GKSessionMode](gamekit/gksessionmode.md)
- [GKVoiceChatServiceError.Code](gamekit/gkvoicechatserviceerror-swift.struct/code.md)
- [GKVoiceChatServiceError](gamekit/gkvoicechatserviceerror-swift.struct.md)
