PusherServer.WsHandler (pusher_server v0.1.2)

Copy Markdown View Source

Implements the client-facing side of the Pusher protocol over a raw cowboy websocket (not Phoenix Channels — a different wire format).

Handles: pusher:subscribe / unsubscribe / ping, private + presence channel auth, client events, and delivering events pushed in via the HTTP trigger endpoint (see PusherServer.HttpRouter) or from other nodes.

Receives the instance name via cowboy route opts (set up in PusherServer), so the same handler code serves any number of independently-configured instances. Everything that must be shared between nodes goes through PusherServer.Cluster.