Closed lovelyelfpop closed 4 years ago
I don't understand the question. Are you asking if it can be used in a Singleton object that is shared between multiple pages of your app and always running in background? If that is the question, the answer is definitely yes, because that is exactly how we use it in our app. We use it to open permanent ws connection as long as the app is opened and we close the ws whenever app goes to background.
Thanks @chax we use it the same actually. My intention may have no aligned with the original posters question, but anyways it was specific to the PING PONG and at times having what I suspected was the websockets stay alive blocking the UI touch scrolls based on the single threaded nature of JS.
Whole websocket code is ran natively. In Java for Android and in ObjectiveC for iOS. It's not blocking anything on UI because of that.
Closing this as question is kind of vague and i responded best i can but there were no further responses from OP.
Anyone???