# PeerSession::Config

<a id="config-5"></a>

# Config

```cpp
#include <icy/webrtc/peersession.h>

struct Config
```

[Defined in src/webrtc/include/icy/webrtc/peersession.h:72](https://github.com/auscaster/icey/blob/main/src/webrtc/include/icy/webrtc/peersession.h#L72)

[Configuration](https://auscaster.com/icey/docs/api-reference/icy-Configuration.md#configuration) for WebRTC peer session establishment.

## Public Attributes

| Return | Name | Description |
|--------|------|-------------|
| `rtc::Configuration` | [`rtcConfig`](#rtcconfig)  | libdatachannel connection options, ICE servers, and transport settings. |
| [`MediaConfig`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-PeerSession-MediaConfig.md#mediaconfig) | [`media`](#media-2)  | Desired media codecs and directions for the session. |
| `bool` | [`enableDataChannel`](#enabledatachannel)  | True to create a data channel on outgoing calls and accept one on incoming calls. |
| `std::string` | [`dataChannelLabel`](#datachannellabel)  | Label to use for the application data channel. |

---

<a id="rtcconfig"></a>

### rtcConfig

```cpp
rtc::Configuration rtcConfig
```

[Defined in src/webrtc/include/icy/webrtc/peersession.h:74](https://github.com/auscaster/icey/blob/main/src/webrtc/include/icy/webrtc/peersession.h#L74)

libdatachannel connection options, ICE servers, and transport settings.

---

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

### media

```cpp
MediaConfig media
```

Type: [`MediaConfig`](https://auscaster.com/icey/docs/api-reference/icy-wrtc-PeerSession-MediaConfig.md#mediaconfig)

[Defined in src/webrtc/include/icy/webrtc/peersession.h:75](https://github.com/auscaster/icey/blob/main/src/webrtc/include/icy/webrtc/peersession.h#L75)

Desired media codecs and directions for the session.

---

<a id="enabledatachannel"></a>

### enableDataChannel

```cpp
bool enableDataChannel = true
```

[Defined in src/webrtc/include/icy/webrtc/peersession.h:76](https://github.com/auscaster/icey/blob/main/src/webrtc/include/icy/webrtc/peersession.h#L76)

True to create a data channel on outgoing calls and accept one on incoming calls.

---

<a id="datachannellabel"></a>

### dataChannelLabel

```cpp
std::string dataChannelLabel = "data"
```

[Defined in src/webrtc/include/icy/webrtc/peersession.h:77](https://github.com/auscaster/icey/blob/main/src/webrtc/include/icy/webrtc/peersession.h#L77)

Label to use for the application data channel.
