ExWapp.Conn (ExWapp v0.1.2)

Copy Markdown View Source

Thin wrapper around the WhatsApp WebSocket transport.

The module is responsible for driving the Noise handshake and routing decrypted nodes back to the owning ExWapp.Session process.

Summary

Functions

Restarts the XML stream after SASL success.

Asks the connection process to send a binary node.

Starts the WebSocket process.

Types

options()

@type options() :: [session: pid(), store: ExWapp.Store.t(), noise: keyword()]

Functions

restart_stream(pid)

@spec restart_stream(pid()) :: :ok

Restarts the XML stream after SASL success.

send_node(pid, node)

@spec send_node(pid(), ExWapp.Binary.binary_node() | tuple()) :: :ok

Asks the connection process to send a binary node.

start_link(opts)

@spec start_link(options()) :: GenServer.on_start()

Starts the WebSocket process.