Server-Side Communication ActionScript > Application.disconnect |
![]() ![]() ![]() |
Application.disconnect
Availability
Flash Communication Server MX.
Usage
application.disconnect(clientObj
)
Parameters
clientObj
The client to disconnect. The object must be a Client object from the application.clients
array.
Returns
A Boolean value of true
if the disconnect was successful; otherwise, false
.
Description
Method; causes the server to terminate a client connection to the application. When this method is called, NetConnection.onStatus
is invoked on the client side with a status message of NetConnection.Connection.Closed
. The application.onDisconnect
method is also invoked.
Example
This example calls the application.disconnect
method to disconnect all users of an application instance:
function disconnectAll(){ for (i=0; i < application.clients.length; i++){ application.disconnect(application.clients[i]); } }
![]() ![]() ![]() |