You can call either of the two functions that were defined in the previous examples (
) by using the following code in a server-side script:
bar
c = new NetConnection();
c.onStatus = function(info) {
if(info.code == "NetConnection.Connect.Success") {
c.call("foo");
c.call("bar", null, 2, 2);
}
};
Client.getBandwidthLimit()
Availability
Flash Communication Server MX 1.0.
Usage
clientObject.getBandwidthLimit(iDirection)
Parameters
An integer specifying the connection direction: 0 indicates a client-to-server
iDirection
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
connection. The value returned indicates bytes per second and can be changed with
Client.setBandwidthLimit()
in the Application.xml file.
Example
The following example uses
to set two variables,
clientToServer
application.onConnect = function(newClient){
var clientToServer= newClient.getBandwidthLimit(0);
var serverToClient= newClient.getBandwidthLimit(1);
};
54
Server-Side ActionScript Language Reference
parameter to get the value for each direction of the
. The default value for a connection is set for each application
Client.getBandwidthLimit()
and
serverToClient
with the
iDirection
:
and
foo
parameter
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?