WebsocketController owns the lifecycle of a WebSocket connection, handles incoming messages, and dispatches messages to WebsocketAction classes.
A WebSocket connection differs from a normal HTTP request: it stays open and can carry multiple messages. Lifecycle callbacks such as onOpen, onClose, and onError manage the channel.
This preview illustrates connection establishment and the lifecycle callbacks that may follow.
This preview shows how an incoming message can be intercepted, dispatched to an action, and answered with a PushAction.
PushAction can replace a component on the connected client without a new HTTP navigation.
An actual live demo requires your configured endpoint URL, session setup, and action mapping. These examples deliberately stop short of inventing a server connection.
These examples introduce the most important behavior without attempting to document every method. For the complete reference, see https://doc.jdance.org.