WebSocket (useWS)
Real-time bidirectional communication and Pub/Sub subscriptions via the useWS hook.
Disconnected
Global Chat Log
Waiting for connection...
How it works
Global Chat: A raw bi-directional WebSocket handler. Message broadcasts are handled manually on the socket loop.
Pub/Sub Rooms: Demonstrates topic-based subscription separation. The client subscribes via WebSocket to receive messages on a specific channel, but publishes messages using standard RPC mutations. Any tab subscribed to the same Room ID will instantly receive the broadcast.