phoenix_gen_socket_client v1.0.0 Phoenix.Channels.GenSocketClient.Transport behaviour
Transport contract used by Phoenix.Channels.GenSocketClient
The implementation has following responsibilities:
- Starts the transport process and links it to the caller. It is always assumed that the caller process is the socket process.
- Pushes messages to the server when the
push/2
function is invoked. - Notifies the socket process about various events by invoking
notify_*
functions from thePhoenix.Channels.GenSocketClient
module.
Summary
Types
frame :: {:text | :binary, GenSocketClient.encoded_message}
transport_pid :: pid
Callbacks
Specs
start_link(url :: String.t, GenSocketClient.transport_opts) ::
{:ok, transport_pid} |
{:error, any}
Invoked from the socket process to start the transport process.