Current section

Files

Jump to
phoenix_socket_client lib phoenix socket_client channel echo_room.ex
Raw

lib/phoenix/socket_client/channel/echo_room.ex

defmodule Phoenix.SocketClient.Channel.EchoRoom do
@moduledoc """
A basic channel implementation that forwards all messages to the caller.
"""
use Phoenix.SocketClient.Channel
@impl true
def handle_message(_event, payload, state) do
send(state.caller, payload)
{:noreply, state}
end
end