WebSocket connection handler for UTCP transport.
This module handles individual WebSocket connections and implements the WebSockex behavior for managing WebSocket state and messages.
Summary
Functions
Calls a tool through the WebSocket connection.
Calls a tool stream through the WebSocket connection.
Clears the message queue.
Closes the WebSocket connection.
Gets all messages from the message queue.
Gets the last used timestamp.
Gets the next message from the message queue.
Sends a message through the WebSocket connection.
Starts a new WebSocket connection.
Updates the last used timestamp.
Functions
Calls a tool through the WebSocket connection.
@spec call_tool_stream(pid(), String.t(), map(), keyword()) :: {:ok, Enumerable.t()} | {:error, term()}
Calls a tool stream through the WebSocket connection.
@spec clear_messages(pid()) :: :ok
Clears the message queue.
@spec close(pid()) :: :ok
Closes the WebSocket connection.
Gets all messages from the message queue.
Gets the last used timestamp.
Gets the next message from the message queue.
Sends a message through the WebSocket connection.
Starts a new WebSocket connection.
@spec update_last_used(pid()) :: :ok
Updates the last used timestamp.