July 2021
Intermediate to advanced
176 pages
4h 14m
English
The best way to learn how callbacks work is to see them in action. We are going to add some functionality to the SendServer module and introduce the most common GenServer callbacks along the way.
You can implement a callback by declaring it in the SendServer module like any other function. By doing this, you are replacing the default function that GenServer provides. This is sometimes called overriding the default implementation. When implementing a callback, there are two things you need to know:
We’re going to cover the following callback functions for the GenServer behaviour:
Read now
Unlock full access