WebSocket Events
SDD Classification: L3-Technical
Authority: Engineering Team
Review Cycle: Quarterly
Event Message Structure
All WebSocket messages follow a standard JSON format:Message Fields
Event Categories
Document Operation Events
Insert Operation
Client sends content insertion:Delete Operation
Client sends content deletion:Format Operation
Client applies formatting:Operation Acknowledgment
Server acknowledges received operation:Operation Broadcast
Server broadcasts operation to other clients:Presence Events
User Joined
When a user connects to the document:User Left
When a user disconnects:Cursor Update
Real-time cursor position updates:Typing Indicator
Shows when a user is actively typing:Comment Events
Comment Added
New comment created:Comment Updated
Comment content modified:Comment Resolved
Comment thread resolved:Comment Deleted
Comment removed:System Events
Connection Acknowledgment
Sent after successful connection:Document Sync
Full document state synchronization:Error Event
Error notification:Heartbeat (Ping/Pong)
Connection health check: Client sends:Event Handling Patterns
Event Dispatcher
Event Batching
Handle multiple rapid events efficiently:Event Reference Table
Related Documentation
- WebSocket Overview - API overview
- Operations - Document operations
- Presence - Presence management
- Error Handling - Error codes
Document Status: Complete Version: 2.0