Simulate real-time user presence (online/away/offline), keystroke typing indicators, and automated response echo bots in collaborative multi-user apps. Both the Native WebSocket and Socket.io gateways synchronize presence events across shared rooms.
Select a simulated participant, toggle presence state or keystroke activity, and inspect the resulting JSON frames:
Standard presence lifecycle transitions supported across room subscribers:
| State | Indicator | Trigger Condition | Description |
|---|---|---|---|
| online | Socket connection active | Client is connected and actively interacting with the workspace. | |
| idle | 300s keystroke inactivity | Connection remains alive but no typing or click activity detected. | |
| away | Explicit status update | User manually toggled status or switched browser tab visibility. | |
| offline | Socket disconnect / timeout | TCP connection closed or heartbeat missed. Client removed from room set. |
Prevent network flooding by debouncing typing indicators with a 1500ms timeout window: