Back

Is there a way to know if a realtime connection is active or not

  • 0
  • Flutter
  • Realtime
  • Storage
karthik1095
9 Oct, 2024, 08:50

i have created a chat in flutter using realtime connection, but sometimes when a user start a chart realtime connection is not working. Is happen rarely. But when this happen user need to refresh. is there any simple way to find if a connection is active before sending a message.

TL;DR
Developers wondering how to check if a realtime connection is active before sending a message, especially in Flutter. Use the `app_realtime_ext` package for Appwrite realtime. Due to a known issue in the Flutter / Dart SDK resetting the connection, it's advisable to check and reestablish the connection if needed before sending a message.
Raman
9 Oct, 2024, 08:54

Well there is a known problem with the Flutter sdk / dart sdk that it reset the connection so I would recommend you check everytime that realtime connection is being made or not and if not make it again

Raman
9 Oct, 2024, 08:56

You can use this package app_realtime_ext

Raman
9 Oct, 2024, 08:58

It is basically made for the Appwrite realtime

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more