Last active
March 9, 2018 15:16
-
-
Save marinho10/2e9a7c8e40cfe34e782923472925b844 to your computer and use it in GitHub Desktop.
UserSocket
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 SuperSlimeGameWeb.UserSocket do | |
use Phoenix.Socket | |
## Channels | |
## Define game channel | |
channel("game:*", SuperSlimeGameWeb.GameChannel) | |
## Transports - long polling | |
transport(:websocket, Phoenix.Transports.WebSocket) | |
def connect(_params, socket) do | |
{:ok, socket} | |
end | |
def id(_socket), do: nil | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment