WebRTC peer connection management for UTCP.
Handles:
- Peer connection establishment with signaling
- ICE candidate exchange and NAT traversal
- Data channel creation and management
- Tool call communication over data channels
Summary
Functions
Calls a tool over the WebRTC data channel.
Calls a tool stream over the WebRTC data channel.
Returns a specification to start this module under a supervisor.
Closes the WebRTC connection.
Gets the connection state.
Gets the ICE connection state.
Starts a new WebRTC connection.
Types
@type t() :: %ExUtcp.Transports.WebRTC.Connection{ call_id_counter: integer(), connection_state: atom(), data_channel: pid() | nil, ice_connection_state: atom(), ice_servers: [map()], peer_connection: pid() | nil, pending_calls: %{required(String.t()) => pid()}, provider: map(), signaling_pid: pid() | nil, signaling_server: String.t() }
Functions
Calls a tool over the WebRTC data channel.
@spec call_tool_stream(pid(), String.t(), map(), integer()) :: {:ok, Enumerable.t()} | {:error, term()}
Calls a tool stream over the WebRTC data channel.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(pid()) :: :ok
Closes the WebRTC connection.
Gets the connection state.
Gets the ICE connection state.
Starts a new WebRTC connection.