PushEx.Behaviour.Socket behaviour (PushEx v2.2.0)
Implementable functions that are used in the flow of socket/channel creation. It is crucial to implement secure connect/join functions for all applications.
Summary
Callbacks
@callback channel_join(bitstring(), map(), Phoenix.Socket.t()) :: {:ok, Phoenix.Socket.t()} | {:ok, reply :: map(), Phoenix.Socket.t()} | {:error, reason :: map()}
@callback presence_identifier(Phoenix.Socket.t()) :: bitstring()
See Phoenix.Presence.track/4
key
@callback socket_connect(map(), Phoenix.Socket.t()) :: {:ok, Phoenix.Socket.t()} | :error
@callback socket_id(Phoenix.Socket.t()) :: bitstring()