PushEx.Behaviour.Socket behaviour (PushEx v2.1.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.
Link to this section Summary
Link to this section Callbacks
Link to this callback
channel_join(bitstring, map, t)
Specs
channel_join(bitstring(), map(), Phoenix.Socket.t()) :: {:ok, Phoenix.Socket.t()} | {:ok, reply :: map(), Phoenix.Socket.t()} | {:error, reason :: map()}
Link to this callback
presence_identifier(t)
Specs
presence_identifier(Phoenix.Socket.t()) :: bitstring()
See Phoenix.Presence.track/4
key
Link to this callback
socket_connect(map, t)
Specs
socket_connect(map(), Phoenix.Socket.t()) :: {:ok, Phoenix.Socket.t()} | :error
Link to this callback
socket_id(t)
Specs
socket_id(Phoenix.Socket.t()) :: bitstring()