Phoenix.SocketClient (phoenix_socket_client v0.7.0)
The main API for the Phoenix Socket Client.
Summary
Functions
Joins a channel through the socket.
Leaves a channel.
Returns a child specification for the socket client supervisor.
Connects the socket.
Checks if the socket is connected.
Disconnects the socket.
Gets the entire socket state.
Gets a value from the socket state.
Pushes a message through the socket.
Puts a value into the socket state.
Removes a channel from the list of joined channels. For internal use.
Starts the socket client supervisor.
Updates the status of a channel. For internal use.
Functions
@spec channel_join(pid(), binary(), map()) :: {:ok, pid()} | {:error, :channel_manager_not_found | {:already_started, pid()}}
Joins a channel through the socket.
Leaves a channel.
@spec child_spec(keyword()) :: Supervisor.child_spec()
Returns a child specification for the socket client supervisor.
Delegates to Phoenix.SocketClient.Supervisor.child_spec/1.
Connects the socket.
Checks if the socket is connected.
Disconnects the socket.
Gets the entire socket state.
Gets a value from the socket state.
@spec push(pid() | atom(), Phoenix.SocketClient.Message.t()) :: Phoenix.SocketClient.Message.t() | no_return()
Pushes a message through the socket.
Puts a value into the socket state.
Removes a channel from the list of joined channels. For internal use.
@spec start_link(keyword()) :: Supervisor.on_start()
Starts the socket client supervisor.
Delegates to Phoenix.SocketClient.Supervisor.start_link/1.
Updates the status of a channel. For internal use.