Amarula.Protocol.Socket.WebSocketClient (amarula v0.4.0)
View SourceWebSocket client implementation using websockex.
This module provides a WebSocket client that handles connection management, message sending/receiving, and event emission for WhatsApp WebSocket communication.
Summary
Functions
Closes the WebSocket connection.
Sends data through the WebSocket connection.
Starts a new WebSocket client.
Types
@type t() :: %Amarula.Protocol.Socket.WebSocketClient{ connect_timeout_timer: reference() | nil, connection_state: Amarula.Protocol.Socket.Types.connection_state(), keep_alive_interval_ms: non_neg_integer(), keep_alive_timer: reference() | nil, parent_pid: pid(), url: String.t() }
Functions
Closes the WebSocket connection.
Sends data through the WebSocket connection.
Starts a new WebSocket client.
Options
:parent_pid- Required. PID of the Connection that will receive events.:url- WebSocket URL (defaults to WhatsApp WebSocket URL):headers- List or map of HTTP headers- Other options for timeouts and configuration