Implement WebSocket events for chat