AI Integration Quick Reference
AI Integration Quick Reference
disconnected → connecting → connected.
Connection States
Get Current Status
UsegetConnectionStatus() to check the current connection state at any time:
- Dart
CometChatWSState.connected(connected)CometChatWSState.connecting(connecting)CometChatWSState.disconnected(disconnected)CometChatWSState.featureThrottled(featureThrottled)
Listen for Connection Changes
Register aConnectionListener to receive real-time connection state updates. We recommend adding this on app startup after CometChat.init() completes.
ConnectionListener Events
- Dart
Remove Connection Listener
Know more about CometChat SDK connection behaviour click here
Next Steps
Connection Behaviour
Understand how CometChat SDK manages WebSocket connections
Login Listeners
Monitor user login and logout events in real-time
All Real-Time Listeners
Complete reference for all SDK listeners
Setup SDK
Install and initialize the CometChat SDK