how to know if a user is still connected or not?
Hi,
I have a chat application using ratchet php.
it works well. 

However, connections are not being closed on mobile devices.
How to know if user is still connected?

I read words like ping-pong, heartbeat etc.

Please suggest a good way to implement any technique to find if user is still connected or not.

Thanks