Gun connection open, upgrade, and cleanup for ZenWebsocket.Client.
Runs inside the Client GenServer process so Gun messages keep the same owner.
Attempt-identity timers are preserved from the Task 2 rewrite. Retry decisions
live in ZenWebsocket.Client.Retry.
Summary
Functions
Fails pending requests, cancels timers, and closes the Gun connection.
Opens the first Gun connection after init/1.
Opens a Gun connection on a scheduled or immediate reconnect.
Marks the connection connected after a WebSocket upgrade.
Builds the GenServer state used by Client.init/1.
Functions
Fails pending requests, cancels timers, and closes the Gun connection.
@spec continue_connect(map()) :: {:noreply, map()} | {:noreply, map(), {:continue, {:connection_failed, term()}}}
Opens the first Gun connection after init/1.
@spec continue_reconnect(map()) :: {:noreply, map()} | {:noreply, map(), {:continue, {:connection_failed, term()}}}
Opens a Gun connection on a scheduled or immediate reconnect.
Marks the connection connected after a WebSocket upgrade.
@spec initial_state( ZenWebsocket.Config.t(), keyword() ) :: map()
Builds the GenServer state used by Client.init/1.