Skip to content

Commit

Permalink
Improve data channel docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 committed Sep 17, 2024
1 parent 6838505 commit f310ba0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/ex_webrtc/data_channel.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,24 @@ defmodule ExWebRTC.DataChannel do
Implementation of the [RTCDataChannel](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel).
"""

@typedoc """
Possible data channel order configurations.
For the exact meaning, refer to the [RTCDataChannel: order property](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/readyState).
"""
@type order() :: :ordered | :unordered

@type ref() :: reference()

@type id() :: non_neg_integer()
@typedoc """
Possible data channel states.
Right now, Elixir WebRTC does not support `:closing` state.
When you close the data channel, it goes from `:open` directly to `:closed`.
@type ready_state() :: :connecting | :open | :closing | :closed
For the exact meaning, refer to the [RTCDataChannel: readyState property](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/readyState).
"""
@type ready_state() :: :connecting | :open | :closed

@typedoc """
Options used when creating a new DataChannel.
Expand Down

0 comments on commit f310ba0

Please sign in to comment.