WebSocket — Aquilia Documentation
Comprehensive guide and documentation for WebSocket in the Aquilia framework. View API reference, examples, and implementation patterns.
CLI / WebSocket Commands WebSocket Commands The aq ws command group provides administrative tools to inspect active WebSocket controllers, broadcast realtime events, compile client SDK code, purge rooms, and disconnect clients. aq ws inspect Dumps the compiled SocketController routing table and message channels compiled within your ws.surp artifacts bundle. aq ws inspect --artifacts-dir=artifacts aq ws broadcast Sends a payload event message to a namespace, room, or specific connection ID using the registered WebSocket adapter backend (e.g. Redis). # Broadcast chat event to general room aq ws broadcast --namespace=/chat --room=general --event=new_message --payload=' ' Options Option Description ))} aq ws gen-client Compiles compiled WebSocket SocketControllers and generates a fully typed TypeScript client SDK. # Compile TypeScript websocket client SDK aq ws gen-client --out=frontend/src/sdk --lang=ts aq ws purge-room Purges a room state from the adapter, forcing all currently connected client members of that room to disconnect. aq ws purge-room --namespace=/chat --room=general aq ws kick Forces the disconnection of a specific connection ID by submitting a kick command to the WebSocket adapter. aq ws kick --conn=client-connection-id-123 --reason="Admin maintenance" )
Go to Homepage