cordova-plugin-websocket-server icon indicating copy to clipboard operation
cordova-plugin-websocket-server copied to clipboard

Server life cycle...

Open voneddy opened this issue 8 years ago • 1 comments

Hi just a quick question, you say 'the server stops responding when the view is terminated / destroyed', is that actual shutting down of the app? Or just when the use hits home (etc)?

Just wondering if the app is still open but the user has navigated away from it if the server will still respond? I'm trying to display info to the user via web sockets when the user has navigated away from the app and assessing my options...

Cheers

voneddy avatar May 04 '16 11:05 voneddy

The server is destroyed on actual shutdown of the App. It does not survive as a background service. When the app is running in the background, it should work ok. When the app (activity) is paused it may not receive messages or accept new connections, but on resume it's back to normal, and previously connected sockets still are, normally. I think that's more accurate like that.

The Home button may pause or not the app, I think it depends on the platform.

I should probably review the description in the README.

Tell me if the behaviour is actually otherwise. Thanks

becvert avatar May 05 '16 13:05 becvert