ExWapp.Client.Transport.RawWebSocket (ExWapp v0.1.2)

Copy Markdown View Source

Diagnostic client adapter backed directly by the low-level WebSocket transport.

This adapter exposes connection and raw transport events to a caller-owned process. It intentionally cannot send high-level ExWapp.Message values, because doing so would bypass session synchronization, device fanout, Signal encryption, sender keys, retries, and persistence.

Use ExWapp.Client.Transport.Session for production messaging. Advanced protocol tooling can call WebSocket.send_node/2 with already-prepared nodes.

Summary

Functions

Starts the low-level WebSocket/Noise process and stores its pid on the client.

Stops the caller-owned raw WebSocket process.

Rejects high-level messages so they cannot bypass the complete session pipeline.

Functions

connect(client)

@spec connect(ExWapp.Client.t()) :: {:ok, ExWapp.Client.t()} | {:error, term()}

Starts the low-level WebSocket/Noise process and stores its pid on the client.

disconnect(client)

@spec disconnect(ExWapp.Client.t()) :: {:ok, ExWapp.Client.t()}

Stops the caller-owned raw WebSocket process.

send_message(client, message)

@spec send_message(ExWapp.Client.t(), ExWapp.Message.t()) :: {:error, atom()}

Rejects high-level messages so they cannot bypass the complete session pipeline.