User Guide

26 Server-Side ActionScript Language Reference
Returns
Nothing.
Description
Method; invokes the garbage collector to reclaim any unused resources for this application
instance.
Application.getStats()
Availability
Flash Communication Server MX 1.0.
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 example uses Application.getStats() to output the application instances
statistics:
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 Media Server MX 1.5