# `ZenWebsocket.Client.Reconnect`
[🔗](https://github.com/ZenHive/zen_websocket/blob/v0.8.0/lib/zen_websocket/client/reconnect.ex#L1)

Explicit reconnect target and option handling for `ZenWebsocket.Client`.

# `reconnect_opts_from_state`

```elixir
@spec reconnect_opts_from_state(map()) :: keyword()
```

Builds the keyword list stored on the Client struct for a later reconnect.

# `reconnect_target`

```elixir
@spec reconnect_target(map()) ::
  {ZenWebsocket.Config.t() | String.t() | nil, keyword()}
```

Reads reconnect target and opts from a live Client struct or its GenServer.

# `reconnect_with`

```elixir
@spec reconnect_with(
  ZenWebsocket.Config.t() | String.t() | nil,
  keyword(),
  (term(), keyword() -&gt; {:ok, struct()} | {:error, term()})
) :: {:ok, struct()} | {:error, term()}
```

Re-opens a connection via `connect_fun` or a caller-supplied `:reconnector`.

---

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