philomena/lib/philomena_web/channels/firehose_channel.ex

17 lines
375 B
Elixir
Raw Permalink Normal View History

2020-06-12 18:56:11 +02:00
defmodule PhilomenaWeb.FirehoseChannel do
use Phoenix.Channel
def join("firehose", _params, socket) do
{:ok, socket}
end
def join(_room, _params, _socket) do
{:error, %{reason: "not_found"}}
end
# Don't allow the connected client to send any messages to the socket
2020-06-12 19:02:28 +02:00
def handle_in(_message, _params, socket) do
2020-06-12 18:56:11 +02:00
{:stop, :shutdown, socket}
end
end