
Server-Side Communication ActionScript 15
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]);
}
}
Application.getStats
Availability
Flash Communication Server MX.
Usage
application.getStats()
Returns
An ActionScript object with various properties for each statistic returned.
Description
Method; returns statistics for the application instance including the total number of bytes sent
and received, the number of RTMP messages sent and received, the number of dropped messages,
the number of clients connected to the application instance, and the number of clients who have
disconnected from the application instance.
Example
The following traces example uses Application.getStats to output the application instance’s
statistics to the Output window:
stats = application.getStats;
trace("Total bytes received: " + stats.bytes_in);
trace("Total bytes sent : " + stats.bytes_out);
trace("RTMP messages received : " + stats.msg_in);
trace("RTMP messages sent : " + stats.msg_out);
trace("RTMP messages dropped : " + stats.msg_dropped);
trace("Total clients connected : " + stats.total_connects);
trace("Total clients disconnected : " + stats.total_disconnects);
Application.hostname
Availability
• Flash Player 6
• Flash Communication Server MX 1.5
Usage
application.hostname
Komentarze do niniejszej Instrukcji