Sockets and Channels
A new socket behaviour has been introduced to handle socket authentication in a single place, wire up default channel assigns, and disconnect a user's multiplex connection as needed.
First things first, create a
UserSocket module in
web/channels/user_socket.ex and move all your channel routes from
web/route.ex to the user socket: (replace MyApp with your application module)
0.14.x - web/router.ex:
defmodule MyApp.Router do ...