January 2018
Intermediate to advanced
220 pages
5h 5m
English
We often talk about Phoenix channels as if each one is a single, monolithic entity that works on its own. In fact, there are a number of moving parts acting in harmony across multiple layers that make channels work as well as they do.
Let’s take a quick look at the most important ones to get a better feeling for the whole.
The channel module is the tip of the iceberg, the visible part that we will interact with the most. It’s a custom Behaviour defined within Phoenix. The Behaviour specifies that we define a join/3 callback for allowing clients to join a specific topic as well as multiple handle_in/3 callbacks to match, handle, and respond to messages sent from clients.
Phoenix.Socket ...
Read now
Unlock full access