virtual-world-framework/vwf — pull request #116 by bcbarsness (2014-01-30 16:16:06+00:00)
Title: Add Node.js reflector client disconnect notification

This fix sends an event to all clients letting them know when a client has disconnected. There is some additional logic in the Ruby server 'onDisconnect' which may be applicable to the Node reflector.

To test:

Open the browser debug console, j
Execute the test/clientNotification test (e.g. http://localhost:3000/test/clientNotification/)
Note the logged msg in the browser console, "vwf.view.document: Client Joined: http-vwf-example-com-clients-vwf:....."
Open up another browser/tab pointing to the same application instance.
Note the 2nd "Client Joined" msg in the browser console
Now close the 2nd (latest) application instance (browser/tab window)
Note the logged msg in the browser console, "vwf.view.document: Client Left: http-vwf-example-com-clients-vwf:..."

This last message indicates that a disconnect notification was distributed & received properly.