Use sockets to broadcast morse progress.
This commit is contained in:
parent
78af9da586
commit
5bb6584286
7 changed files with 54 additions and 62 deletions
7
ui/lib/ui_web/channels/morse_progress_channel.ex
Normal file
7
ui/lib/ui_web/channels/morse_progress_channel.ex
Normal 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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue