How To Close The Connection To The Server

<< Back to the SharedPhidgets page


There are two different ways to close a connection to the server; it depends on the fact if you use the ConnectionManager or the ConnectionManagerSkin object to open and close connections to the server:

1. Using the ConnectionManager object: You can disconnect from this server by simply using the closeConnection() method:

connectionManager.closeConnection();


2. Using the ConnectionManagerSkin object: Here are again different ways to disconnect from the server. The most obvious way is to simply click on the disconnect button of the control:

You can also switsch between the connected and disconnected state by using the toggleConnection() method:

connectionManagerSkin.toggleConnection();

Or you can use the closeConnection() method:

connectionManagerSkin.closeConnection();