INDEX

void setDisconnectionListeners(DOMString service_name, Function listener)

Set disconnection listener to both unsecure and secure required or provided service simultaneously.

Parameter Description
service_name Name of a service.
listener User defined callback function that is called on disconnection.

The arguments passed to the disconnection event listener are identical to explained in Service.setDisconnectionListener.

The operation defined in the Service.setDisconnectionListener method is comparable to this method. The difference is explained by how Spaceify's API opens both unsecure and secure service types automatically. This method sets the listener to both of the types.

Use the Service.setDisconnectionListener method, if you have acquired both unsecure and secure services with getProvidedService or getRequiredService, and want to, for example, have separate listeners for the types.

Close
copyright © Spaceify.org 2014