Stop the connection for this application. An
ApplicationTimeoutException is thrown if the
method does not succeed within the number of seconds specified by the
timeout.
If no connection was previously stopped, then this operation
has no effect. You can set the ApplicationCallback before calling this
operation to receive asynchronous notification of connection status changes.
If a callback handler is registered, the sequence of callbacks as a result of calling
StopConnection is:
- OnConnectionStatusChanged(ConnectionStatus.DISCONNECTING,
0, "")
- OnConnectionStatusChanged(ConnectionStatus.DISCONNECTED,
0, "")
Syntax
public void StopConnection(int timeout)
Parameters
- timeout – The number of seconds to wait until the connection is stopped. If the timeout value is less than or equal to 0, then this method
returns immediately without waiting for the registration to finish (a non-blocking
call).
Examples
- Stop the Application –
StopConnection(60)