ZenWebsocket.Client.Callbacks (ZenWebsocket v0.7.0)

Copy Markdown View Source

handle_call/3 and handle_info/2 clause bodies for ZenWebsocket.Client.

The GenServer callbacks stay on Client so supervision and message ownership do not change; this module holds the pattern-matched routing those callbacks previously inlined.

Summary

Functions

Routes Client handle_call/3 requests. Clause order matches the original Client.

Routes Client handle_info/2 messages. Pins and fall-through match the original Client.

Functions

handle_call(arg1, from, state)

@spec handle_call(term(), GenServer.from(), map()) ::
  {:reply, term(), map()} | {:noreply, map()}

Routes Client handle_call/3 requests. Clause order matches the original Client.

handle_info(msg, state)

@spec handle_info(term(), map()) ::
  {:noreply, map()}
  | {:noreply, map(), {:continue, term()}}
  | {:stop, term(), map()}

Routes Client handle_info/2 messages. Pins and fall-through match the original Client.