# `ExWapp.Session.Worker.NodeHandler`
[🔗](https://github.com/elchemista/ex_wapp/blob/v0.1.5/lib/ex_wapp/session/worker/node_handler.ex#L1)

Dispatches inbound `Binary.Node` stanzas received after the Noise handshake.

Every public function returns `{state, actions}` where *actions* is a list
of tuples the caller (Worker) will execute (e.g. `{:send_node, node}`).

# `immediate_actions`

```elixir
@spec immediate_actions(ExWapp.Binary.Node.t()) :: [term()]
```

Returns transport acknowledgements that must be enqueued before normal node
handling. This is intentionally separate from `safe_handle_node/2`: message
decryption and persistence may block or fail, while the server-level stanza
ACK is independent of those application phases.

# `safe_handle_action`

```elixir
@spec safe_handle_action(term(), ExWapp.Session.Worker.t()) :: :ok
```

Safely executes an action returned by a node handler.

# `safe_handle_node`

```elixir
@spec safe_handle_node(ExWapp.Binary.Node.t(), ExWapp.Session.Worker.t()) ::
  {ExWapp.Session.Worker.t(), list()}
```

Safely handles a node, catching any exceptions.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
