Mooncore.Endpoint.Socket.Clients
(mooncore v0.2.4)
Copy Markdown
Tracks WebSocket client PIDs organized by group and channel.
Uses an ETS :bag table for lock-free concurrent reads — list_members/3
reads directly from ETS without going through the GenServer. Writes
(add/remove) are serialized through the GenServer for consistency.
ETS table name is :mooncore_{pool} (e.g. :mooncore_default).
Usage
Started automatically by Mooncore.Application for each pool in config.
Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for GenServer.init/1.
Full state as a nested map. Reads from ETS.
All channels and PIDs for a group. Reads from ETS.
List PIDs for a channel. Reads directly from ETS — no GenServer call.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Callback implementation for GenServer.init/1.
Full state as a nested map. Reads from ETS.
All channels and PIDs for a group. Reads from ETS.
List PIDs for a channel. Reads directly from ETS — no GenServer call.