void setDisconnectionListener(Function listener)

Set a disconnestion listener for a provided service. The event listener will be called every time a client disconnects from the provided service.

Parameter Description
listener User defined callback function that is called on connection.

The connection listner is called with these arguments.

Argument Type Desription
connectionId DOMString Unique identifier of a connection.
service_name DOMString Service name of a provided service.
isSecure Boolean The connection is secure if the value true and false if not.
unique_name DOMString Unique name of the application or spacelet providing the service.

Every provided service can have a separate disconnection listener but one listener is enough if the service_name and isSecure arguments are utilized.

copyright © 2014