This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule AsyncSocket do | |
use GenServer | |
use MatchmakerApiWeb.ChannelCase | |
# Client | |
defmacro create_and_join(channel, topic, payload) do | |
if endpoint = Module.get_attribute(__CALLER__.module, :endpoint) do | |
quote do | |
{:ok, pid} = AsyncSocket.start_link(unquote(endpoint)) |