-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A method that would expose a native WebSocket Object. #1648
Comments
@lohanidamodar will exposing the WebSocket instance be a problem for Flutter? |
@TorstenDittmann Apart from Flutter web, I should be able to expose web socket if needed. However, if I do expose, and someone closes web socket from outside, SDK will cause bunch of unintended memory links as there would be streams, and channels not properly closed. May be we should just expose whether or not the connection is alive? |
I like the idea of @lohanidamodar to just expose the connection alive status. In Flutter, when the apps resume from background, we don't have any way to check if the realtime connection is still alive... So right now I need to close it and reopen it, but it leads sometimes to receiving realtime messages multiple times. |
Any updates on this topic so far? |
🚀 Feature
It would be great to be able to check if the connection with the websocket (Realtime) is open on android/flutter. A method, that would expose the a WebSocket Object would allow that.
Have you spent some time to check if this issue has been raised before?
I've been told by @TorstenDittmann to raise this issue.
Have you read the Code of Conduct?
I did :)
Pitch
Well, Android sometimes closes the websocket connection when the screen is turned off. An easy way to re-connect with the Realtime service, would be to make use of Flutters
AppLifecycleState
. One could listen for theAppLifecycleState.resumed
and reconnect.The text was updated successfully, but these errors were encountered: