
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
35
Call this method from a client-side script to detect client bandwidth. If the client is connected directly to the origin
server, bandwidth detection occurs on the origin. If the client is connected to the origin server through an edge
server, bandwidth detection happens at the first edge to which the client connected.
To use this method to detect client bandwidth, you must also define
onBWDone() and onBWCheck() methods in a
client-side script. For more information, see Detect bandwidth in Adobe Flash Media Server Developer Guide.
Note: If this function is defined in a server-side script, the client call invokes that instead of the
checkBandwith()
definition in the core server code.
Availability
Flash Media Interactive Server 3 and Flash Media Development Server 3
Client.getBandwidthLimit()
clientObject.getBandwidthLimit(iDirection)
Returns the maximum bandwidth that the client or the server can use for this connection. Use the iDirection
parameter to get the value for each direction of the connection. The value returned indicates bytes per second and
can be changed with the
Client.setBandwidthLimit() method. Set the default value for a connection in the
Application.xml file of each application.
Availability
Flash Communication Server 1
Parameters
iDirection A number specifying the connection direction. The value 0 indicates a client-to-server direction; 1
indicates a server-to-client direction.
Returns
A number.
Example
The following example uses
Client.getBandwidthLimit() to set the variables clientToServer and
serverToClient:
application.onConnect = function(newClient){
var clientToServer= newClient.getBandwidthLimit(0);var serverToClient=
newClient.getBandwidthLimit(1);
};
Client.getStats()
clientObject.getStats()
Returns statistics for the client.
Availability
Flash Communication Server 1
Returns
An Object with various properties for each statistic returned. The following table describes the properties of the
returned object:
Commenti su questo manuale