This thread has example how to use it Can Phoenix channel detect client offline immediately?Like WiFi disconnected