Phoenix.SocketClient.Channel.Helpers (phoenix_socket_client v0.8.1)

View Source

Helper functions for Phoenix.SocketClient.Channel GenServer callbacks.

This module contains the actual implementation logic for channel callbacks, extracted from the __using__ macro to improve code maintainability.

Summary

Functions

Handles the :get_topic call.

Handles the :join call.

Handles the :leave call.

Handles the {:push, event, payload} call.

Handles the {:push, event, payload} cast.

Initializes a channel process.

Handles channel termination.

Functions

handle_get_topic_call(from, state)

Handles the :get_topic call.

handle_join_call(from, state)

Handles the :join call.

handle_leave_call(from, state)

Handles the :leave call.

handle_message_info(message, state, handle_message_fun)

Handles regular message info.

handle_phx_reply_info(msg, s, handle_message_fun, handle_join_reply_fun \\ nil)

Handles phx_reply messages.

handle_push_call(arg, from, state)

Handles the {:push, event, payload} call.

handle_push_cast(arg, state)

Handles the {:push, event, payload} cast.

init_impl(arg)

Initializes a channel process.

terminate_impl(reason, state)

Handles channel termination.