# `Mediasoup.DataConsumer`
[🔗](https://github.com/oviceinc/mediasoup-elixir/blob/main/lib/data_consumer.ex#L1)

https://mediasoup.org/documentation/v3/mediasoup/api/#DataConsumer

# `event_type`

```elixir
@type event_type() :: :on_close
```

# `sctpStreamParameters`

```elixir
@type sctpStreamParameters() :: map()
```

https://mediasoup.org/documentation/v3/mediasoup/sctp-parameters/#SctpStreamParameters

# `t`

```elixir
@type t() :: %Mediasoup.DataConsumer{
  data_producer_id: String.t(),
  id: String.t(),
  label: String.t(),
  pid: pid(),
  protocol: String.t(),
  sctp_stream_parameters: sctpStreamParameters(),
  type: type()
}
```

# `type`

```elixir
@type type() :: String.t()
```

https://mediasoup.org/documentation/v3/mediasoup/api/#DataConsumerType
 "sctp" or "direct"

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `close`

```elixir
@spec close(t()) :: :ok
```

# `closed?`

```elixir
@spec closed?(t()) :: boolean()
```

# `data_producer_id`

```elixir
@spec data_producer_id(t()) :: String.t()
```

# `event`

```elixir
@spec event(t(), pid(), event_types :: [event_type()]) ::
  {:ok} | {:error, :terminated}
```

# `id`

```elixir
@spec id(t()) :: String.t()
```

# `label`

```elixir
@spec label(t()) :: String.t()
```

# `link_pipe_producer`

# `protocol`

```elixir
@spec protocol(t()) :: String.t()
```

# `sctp_stream_parameters`

```elixir
@spec sctp_stream_parameters(t()) :: sctpStreamParameters()
```

# `start_link`

# `struct_from_pid`

```elixir
@spec struct_from_pid(pid()) :: t()
```

# `struct_from_pid_and_ref`

# `type`

```elixir
@spec type(t()) :: type()
```

---

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