Client.setBandwidthLimit()

Availability

Flash Communication Server MX 1.0.

Usage

clientObject.setBandwidthLimit(iServerToClient, iClientToServer)

Parameters

iServerToClient A Number; the bandwidth from server to client, in bytes per second. Use 0 if you don't want to change the current setting.

iClientToServer A Number; the bandwidth from client to server, in bytes per second. Use 0 if you don't want to change the current setting.

Returns

Nothing.

Description

Method; sets the maximum bandwidth for this client from client to server, server to client, or both. The default value for a connection is set for each application in the Application.xml file. The value specified cannot exceed the bandwidth cap value specified in the Application.xml file.

Example

The following example sets the bandwidth limits for each direction, based on values passed to the onConnect function:

application.onConnect = function(newClient, serverToClient, clientToServer){
    newClient.setBandwidthLimit(serverToClient, clientToServer);
    application.acceptConnection(newClient);
} 

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fms/2/docs/00000679.html