Skip to main content
Reads in ClarioDesk are live. You don’t poll. The SDK holds a realtime connection and pushes updates into your streams (Flutter) or subscriptions and hooks (React Native) as they happen.

Transport

The SDK connects over Centrifugo by default and falls back to SSE (Server-Sent Events) automatically when Centrifugo isn’t reachable. The connection handshake is signed by the device key, same as every other authenticated request. You don’t configure any of this — it’s on by default.

Connection state

You can observe the connection so your UI can show an offline banner or a reconnecting spinner. The state machine is:
StateMeaning
connectingFirst connection attempt in progress.
connectedLive; updates are streaming.
reconnectingDropped; automatically retrying with backoff.
disconnectedNot connected (e.g. app backgrounded).
fatalUnrecoverable (e.g. device revoked); won’t retry.
ClarioDesk.connectionStream().listen((state) {
  // 'connecting' | 'connected' | 'reconnecting' | 'disconnected' | 'fatal'
});

What streams live

  • Messages — agent replies appear in the open thread instantly.
  • Tickets — status changes and unread indicators update in the inbox.
  • Typing — whether a support agent is currently typing.
  • Agent presence — whether an agent is online.
  • Read receipts — when the agent has seen the user’s message.

Optimistic sends & the offline outbox

Writes are optimistic. A message you send appears immediately as pending (“sending…”). On success it settles; on rejection it’s marked failed so you can render tap-to-retry. A send made while offline stays pending and auto-flushes on reconnect via a durable outbox — nothing is lost if the network drops mid-send. See the per-SDK API references for the exact flags and retry method (Flutter, React Native).