LlmCall.WS.Mint (llm_call v0.1.0)

Copy Markdown View Source

The default WebSocket transport, backed by Mint.WebSocket.

The connection is active and owned by the process that calls connect/3: Mint delivers socket messages to that process, and recv/2 (or feed/2) passes them to Mint.WebSocket.stream/2. A caller that moves the connection to another process must do so after connect/3 returns.

Pings are answered with their payload inside recv/2 and feed/2; pongs are ignored. A peer close is returned as {:close, code, reason}; closing the socket is the caller's decision.

Options: :timeout (connect and upgrade, default 15 seconds), :transport_opts, :proxy, :proxy_headers, :log. The socket must stay active, so mode: :active is the only accepted value; anything else is {:error, {:unsupported_mode, mode}} rather than a connect timeout.