Skip to content

Instantly share code, notes, and snippets.

View cthpw103's full-sized avatar
👌
ok this is epic

cth103 cthpw103

👌
ok this is epic
View GitHub Profile
def handle_call({:publish, message}, _from, %{sessions: sessions}=state) do
Enum.each(sessions, &send(&1.pid, message))
{:reply, :ok, state}
end