# `XMediaLib.SDP.Connection`
[🔗](https://github.com/Lazarus404/xmedialib/blob/main/lib/sdp/types.ex#L75)

SDP connection data (`c=`) giving the default network address for media.

## What problem this solves

The SDP `c=` line gives the default network address for media when ICE has not
yet selected a candidate. Session- and media-level connection data must be
represented separately from ICE `a=candidate` lines. This struct holds the
parsed `c=` fields for `XMediaLib.SDP` encode/decode.

Session-level `c=` applies to all following `m=` sections until overridden
by a media-level `c=`. ICE and WebRTC often rely on candidates instead,
but the connection line remains part of the baseline SDP grammar.

Wire form: `c=<nettype> <addrtype> <connection-address>`

## RFCs

* [RFC 8866](https://www.rfc-editor.org/rfc/rfc8866) pt.5.7

# `t`

```elixir
@type t() :: %XMediaLib.SDP.Connection{
  addr_type: String.t(),
  address: String.t(),
  net_type: String.t()
}
```

Connection fields from `c=<nettype> <addrtype> <connection-address>`.

## Fields

* `:net_type` - network type, usually `IN`
* `:addr_type` - address family, e.g. `IP4` or `IP6`
* `:address` - unicast or multicast destination address

---

*Consult [api-reference.md](api-reference.md) for complete listing*
