ExWapp.Transport behaviour (ExWapp v0.1.2)

Copy Markdown View Source

Behaviour for wire-level WhatsApp protocol transports.

A protocol transport owns socket lifecycle and raw node/frame exchange below the session engine. It must not build high-level message types or bypass Signal/fanout. ExWapp.Conn is the production implementation.

Do not confuse this layer with ExWapp.Client.Transport, whose historical name describes a high-level client runtime adapter.

Summary

Types

wa_node()

@type wa_node() :: term()

Callbacks

restart_stream(pid)

@callback restart_stream(pid()) :: :ok | {:error, term()}

send_node(pid, wa_node)

@callback send_node(pid(), wa_node()) :: :ok | {:error, term()}

start_link(keyword)

@callback start_link(keyword()) :: GenServer.on_start()