# Client::ClientData

<a id="clientdata"></a>

# ClientData

```cpp
#include <src/symple/src/client/detail.h>

struct ClientData
```

[Defined in src/symple/src/client/detail.h:15](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L15)

The client's private state: its options, loop, WebSocket connection, roster, rooms and reconnect timer.

## Public Attributes

| Return | Name | Description |
|--------|------|-------------|
| [`Options`](https://auscaster.com/icey/docs/api-reference/icy-smpl-Client-Options.md#options-15) | [`options`](#options-14)  |  |
| [`uv::Loop`](https://auscaster.com/icey/docs/api-reference/uv.md#loop-1) * | [`loop`](#loop-9)  |  |
| [`http::ClientConnection::Ptr`](https://auscaster.com/icey/docs/api-reference/icy-http-ClientConnection.md#ptr-16) | [`ws`](#ws-1)  |  |
| [`Roster`](https://auscaster.com/icey/docs/api-reference/icy-smpl-Roster.md#roster-2) | [`roster`](#roster-1)  |  |
| `std::string` | [`ourID`](#ourid-1)  |  |
| `std::unordered_set< std::string >` | [`currentRooms`](#currentrooms)  | Authoritative rooms from welcome / acks. |
| `std::unordered_set< std::string >` | [`desiredRooms`](#desiredrooms)  | Rooms the client wants persisted across reconnects. |
| `std::unordered_set< std::string >` | [`pendingJoins`](#pendingjoins)  | Join requests sent but not yet acknowledged. |
| `std::unordered_set< std::string >` | [`pendingLeaves`](#pendingleaves)  | Leave requests sent but not yet acknowledged. |
| `int` | [`announceStatus`](#announcestatus)  |  |
| [`Timer`](https://auscaster.com/icey/docs/api-reference/icy-Timer.md#timer) | [`reconnectTimer`](#reconnecttimer)  |  |
| `int` | [`reconnectCount`](#reconnectcount)  |  |
| `bool` | [`wasOnline`](#wasonline)  |  |
| `bool` | [`closing`](#closing-2)  |  |
| `bool` | [`remoteShutdown`](#remoteshutdown)  |  |

---

<a id="options-14"></a>

### options

```cpp
Options options
```

Type: [`Options`](https://auscaster.com/icey/docs/api-reference/icy-smpl-Client-Options.md#options-15)

[Defined in src/symple/src/client/detail.h:24](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L24)

---

<a id="loop-9"></a>

### loop

```cpp
uv::Loop * loop
```

Type: [`uv::Loop`](https://auscaster.com/icey/docs/api-reference/uv.md#loop-1) *

[Defined in src/symple/src/client/detail.h:25](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L25)

---

<a id="ws-1"></a>

### ws

```cpp
http::ClientConnection::Ptr ws
```

Type: [`http::ClientConnection::Ptr`](https://auscaster.com/icey/docs/api-reference/icy-http-ClientConnection.md#ptr-16)

[Defined in src/symple/src/client/detail.h:26](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L26)

---

<a id="roster-1"></a>

### roster

```cpp
Roster roster
```

Type: [`Roster`](https://auscaster.com/icey/docs/api-reference/icy-smpl-Roster.md#roster-2)

[Defined in src/symple/src/client/detail.h:27](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L27)

---

<a id="ourid-1"></a>

### ourID

```cpp
std::string ourID
```

[Defined in src/symple/src/client/detail.h:28](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L28)

---

<a id="currentrooms"></a>

### currentRooms

```cpp
std::unordered_set< std::string > currentRooms
```

[Defined in src/symple/src/client/detail.h:29](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L29)

Authoritative rooms from welcome / acks.

---

<a id="desiredrooms"></a>

### desiredRooms

```cpp
std::unordered_set< std::string > desiredRooms
```

[Defined in src/symple/src/client/detail.h:30](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L30)

Rooms the client wants persisted across reconnects.

---

<a id="pendingjoins"></a>

### pendingJoins

```cpp
std::unordered_set< std::string > pendingJoins
```

[Defined in src/symple/src/client/detail.h:31](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L31)

Join requests sent but not yet acknowledged.

---

<a id="pendingleaves"></a>

### pendingLeaves

```cpp
std::unordered_set< std::string > pendingLeaves
```

[Defined in src/symple/src/client/detail.h:32](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L32)

Leave requests sent but not yet acknowledged.

---

<a id="announcestatus"></a>

### announceStatus

```cpp
int announceStatus = 0
```

[Defined in src/symple/src/client/detail.h:33](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L33)

---

<a id="reconnecttimer"></a>

### reconnectTimer

```cpp
Timer reconnectTimer
```

Type: [`Timer`](https://auscaster.com/icey/docs/api-reference/icy-Timer.md#timer)

[Defined in src/symple/src/client/detail.h:34](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L34)

---

<a id="reconnectcount"></a>

### reconnectCount

```cpp
int reconnectCount = 0
```

[Defined in src/symple/src/client/detail.h:35](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L35)

---

<a id="wasonline"></a>

### wasOnline

```cpp
bool wasOnline = false
```

[Defined in src/symple/src/client/detail.h:36](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L36)

---

<a id="closing-2"></a>

### closing

```cpp
bool closing = false
```

[Defined in src/symple/src/client/detail.h:37](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L37)

---

<a id="remoteshutdown"></a>

### remoteShutdown

```cpp
bool remoteShutdown = false
```

[Defined in src/symple/src/client/detail.h:38](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L38)

## Public Methods

| Return | Name | Description |
|--------|------|-------------|
|  | [`ClientData`](#clientdata-1) `inline` `explicit` |  |

---

<a id="clientdata-1"></a>

### ClientData

`inline` `explicit`

```cpp
inline explicit ClientData(Options opts, uv::Loop * targetLoop)
```

[Defined in src/symple/src/client/detail.h:17](https://github.com/auscaster/icey/blob/main/src/symple/src/client/detail.h#L17)
