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

Per-session outbound command queue.

It serializes transport writes and keeps pending commands while the transport
connection is unavailable.

# `item`

```elixir
@type item() :: {:send_node, term()} | :restart_stream
```

# `t`

```elixir
@type t() :: %ExWapp.Session.OutboundQueue{
  conn: pid() | nil,
  drop_policy: :reject_new | :drop_oldest,
  flush_batch_size: pos_integer(),
  flush_tick_ms: pos_integer(),
  flush_timer: reference() | nil,
  max_size: pos_integer(),
  queue: :queue.queue(item()),
  session: pid(),
  transport: module()
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `clear_conn`

```elixir
@spec clear_conn(pid()) :: :ok
```

# `enqueue_node`

```elixir
@spec enqueue_node(pid(), term()) :: :ok
```

# `enqueue_priority_node`

```elixir
@spec enqueue_priority_node(pid(), term()) :: :ok
```

Enqueues a protocol-critical node ahead of normal application traffic.

Stanza ACKs use this path so a reconnect backlog or a burst of outbound
messages cannot delay the acknowledgement that keeps the stream healthy.

# `restart_stream`

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

# `set_conn`

```elixir
@spec set_conn(pid(), pid()) :: :ok
```

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

---

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