Flash Media Server Developer Documentation

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); 
};