# Client::Options

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

# Options

```cpp
#include <icy/symple/client.h>

struct Options
```

[Defined in src/symple/include/icy/symple/client.h:93](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L93)

Connection and authentication options for the Symple client.

## Public Attributes

| Return | Name | Description |
|--------|------|-------------|
| `std::string` | [`host`](#host-2)  |  |
| `uint16_t` | [`port`](#port-2)  |  |
| `bool` | [`secure`](#secure-1)  | Use wss:// instead of ws://. |
| `bool` | [`reconnection`](#reconnection)  | Auto-reconnect on disconnect. |
| `int` | [`reconnectAttempts`](#reconnectattempts)  | 0 = unlimited |
| `int` | [`reconnectDelay`](#reconnectdelay)  | Milliseconds between retries. |
| `std::string` | [`user`](#user-1)  | User identifier (required) |
| `std::string` | [`name`](#name-16)  | Display name. |
| `std::string` | [`type`](#type-22)  | [Peer](https://auscaster.com/icey/docs/api-reference/icy-smpl-Peer.md#peer-1) type. |
| `std::string` | [`token`](#token)  | Auth token (optional) |
| `size_t` | [`maxMessageSize`](#maxmessagesize)  | Maximum inbound message size. |

---

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

### host

```cpp
std::string host = "127.0.0.1"
```

[Defined in src/symple/include/icy/symple/client.h:95](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L95)

---

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

### port

```cpp
uint16_t port = 4500
```

[Defined in src/symple/include/icy/symple/client.h:96](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L96)

---

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

### secure

```cpp
bool secure = false
```

[Defined in src/symple/include/icy/symple/client.h:97](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L97)

Use wss:// instead of ws://.

---

<a id="reconnection"></a>

### reconnection

```cpp
bool reconnection = true
```

[Defined in src/symple/include/icy/symple/client.h:98](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L98)

Auto-reconnect on disconnect.

---

<a id="reconnectattempts"></a>

### reconnectAttempts

```cpp
int reconnectAttempts = 0
```

[Defined in src/symple/include/icy/symple/client.h:99](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L99)

0 = unlimited

---

<a id="reconnectdelay"></a>

### reconnectDelay

```cpp
int reconnectDelay = 3000
```

[Defined in src/symple/include/icy/symple/client.h:100](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L100)

Milliseconds between retries.

---

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

### user

```cpp
std::string user
```

[Defined in src/symple/include/icy/symple/client.h:102](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L102)

User identifier (required)

---

<a id="name-16"></a>

### name

```cpp
std::string name
```

[Defined in src/symple/include/icy/symple/client.h:103](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L103)

Display name.

---

<a id="type-22"></a>

### type

```cpp
std::string type
```

[Defined in src/symple/include/icy/symple/client.h:104](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L104)

[Peer](https://auscaster.com/icey/docs/api-reference/icy-smpl-Peer.md#peer-1) type.

---

<a id="token"></a>

### token

```cpp
std::string token
```

[Defined in src/symple/include/icy/symple/client.h:105](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L105)

Auth token (optional)

---

<a id="maxmessagesize"></a>

### maxMessageSize

```cpp
size_t maxMessageSize = 256 * 1024
```

[Defined in src/symple/include/icy/symple/client.h:106](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L106)

Maximum inbound message size.

## Public Methods

| Return | Name | Description |
|--------|------|-------------|
|  | [`Options`](#options-16)  | Defaulted constructor. |

---

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

### Options

```cpp
Options() = default
```

[Defined in src/symple/include/icy/symple/client.h:108](https://github.com/auscaster/icey/blob/main/src/symple/include/icy/symple/client.h#L108)

Defaulted constructor.
