Process-down-safe GenServer.call helpers used by ZenWebsocket.Client.
Touches no Gun state. Every public Client accessor that talks to the
connection process goes through safe_call/3.
Summary
Functions
True when a GenServer.call/2 exit means the target process is gone.
GenServer.call/2 that returns fallback when the server process is down.
Starts the Client GenServer, installs the default parent handler when none is provided, and awaits the WebSocket upgrade.
Unwraps a GenServer.call/3 exit into the error reason returned to callers.
Adds a parent-process message handler when :handler is absent from opts.
Functions
True when a GenServer.call/2 exit means the target process is gone.
GenServer.call/2 that returns fallback when the server process is down.
@spec start_client(module(), ZenWebsocket.Config.t(), keyword(), (map(), pid() -> struct())) :: {:ok, struct()} | {:error, term()}
Starts the Client GenServer, installs the default parent handler when none is provided, and awaits the WebSocket upgrade.
Unwraps a GenServer.call/3 exit into the error reason returned to callers.
Adds a parent-process message handler when :handler is absent from opts.