How To Close The Shared Phidgets Connection

<< Back to the SharedPhidgets 3 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 switch between the connected and disconnected state by using the ToggleConnection() method:

connectionManagerSkin.ToggleConnection();

Or you can use the CloseConnection() method:

connectionManagerSkin.CloseConnection();