clientObject.getStats()
Returns statistics for the client.
Flash Communication Server 1
An Object with various properties for each statistic returned. The following table describes the properties of the returned object:
|
Property |
Description |
|---|---|
|
bytes_in |
Total number of bytes received. |
|
bytes_out |
Total number of bytes sent. |
|
msg_in |
Total number of RTMP messages received. |
|
msg_out |
Total number of RTMP messages sent. |
|
msg_dropped |
Total number of dropped RTMP messages. |
|
ping_rtt |
Length of time the client takes to respond to a ping message. |
|
audio_queue_msgs |
Current number of audio messages in the queue waiting to be delivered to the client. |
|
video_queue_msgs |
Current number of video messages in the queue waiting to be delivered to the client. |
|
so_queue_msgs |
Current number of shared object messages in the queue waiting to be delivered to the client. |
|
data_queue_msgs |
Current number of data messages in the queue waiting to be delivered to the client. |
|
dropped_audio_msgs |
Number of audio messages that were dropped. |
|
dropped_video_msgs |
Number of video messages that were dropped. |
|
audio_queue_bytes |
Total size of all audio messages (in bytes) in the queue waiting to be delivered to the client. |
|
video_queue_bytes |
Total size of all video messages (in bytes) in the queue waiting to be delivered to the client. |
|
so_queue_bytes |
Total size of all shared object messages (in bytes) in the queue waiting to be delivered to the client. |
|
data_queue_bytes |
Total size of all data messages (in bytes) in the queue waiting to be delivered to the client. |
|
dropped_audio_bytes |
Total size of all audio messages (in bytes) that were dropped. |
|
dropped_video_bytes |
Total size of all video messages (in bytes) that were dropped. |
|
bw_out |
Current upstream (client to server) bandwidth for this client. |
|
bw_in |
Current downstream (server to client) bandwidth for this client. |
|
client_id |
A unique ID issued by the server for this client. |
The following example outputs a client's statisitics:
function testStats(){
var stats = client.getStats();
for(var prop in stats){
trace("stats." + prop + " = " + stats[prop]);
}
}
application.onConnect = function(client){
this.acceptConnection(client);
testStats();
};