Use sockets to broadcast morse progress.

This commit is contained in:
Pim Kunis 2019-07-31 00:20:09 +02:00
parent 78af9da586
commit 5bb6584286
7 changed files with 54 additions and 62 deletions

View file

@ -0,0 +1,7 @@
defmodule UiWeb.MorseProgressChannel do
use UiWeb, :channel
def join(channel_name, _params, socket) do
{:ok, %{hi: :there}, socket}
end
end

View file

@ -2,7 +2,7 @@ defmodule UiWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", UiWeb.RoomChannel
channel "morse:progress", UiWeb.MorseProgressChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After