You will need to identify these users and have their identifiers, and then write a simple class that will always listen to this WebSocket for any user changes (users are connected, disconnected).
- , .
, .. WebSocket WebSocket onMessage ( userId , ).
, , : http://socketo.me/docs/hello-world