Skip to content

Commit f310ba0

Browse files
committed
Improve data channel docs
1 parent 6838505 commit f310ba0

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

lib/ex_webrtc/data_channel.ex

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,24 @@ defmodule ExWebRTC.DataChannel do
33
Implementation of the [RTCDataChannel](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel).
44
"""
55

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

813
@type ref() :: reference()
914

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

1425
@typedoc """
1526
Options used when creating a new DataChannel.

0 commit comments

Comments
 (0)