Server-Side Communication ActionScript > Client.getBandwidthLimit |
Client.getBandwidthLimit
Availability
Flash Communication Server MX.
Usage
Client.getBandwidthLimit(iDirection)
Parameters
iDirection An integer specifying the connection direction: 0 indicates a client-to-server direction, 1 indicates a server-to-client direction.
Returns
An integer indicating bytes per second.
Description
Method; 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 Client.setBandwidthLimit. The default value for a connection is set for each application in the Application.xml file.
Example
The following example uses Client.getBandwidthLimit with the iDirection parameter to set two variables, clientToServer and serverToClient:
application.onConnect = function(newClient){
var clientToServer= newClient.getBandwidthLimit(0);var serverToClient= newClient.getBandwidthLimit(1);
};