Application.server - MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Manual

Server-side communication actionscript dictionary
Table of Contents

Advertisement

Returns
Nothing.
Description
Method; rejects the connection call from a client to the server. The
event handler notifies a script when a new client is connecting. In the function assigned to
application.onConnect
function for
application.onConnect
case, an application could call
response callback to disconnect the client from the server.
Example
In the following example, the client specified by
message contained in
side.
function onConnect(client1){
// insert code here
var err = new Object();
err.message = "Too many connections";
application.rejectConnection(client1, err);
}
The following code should appear on the client side:
clientConn.onStatus = function (info){
if (info.code == "NetConnection.Connect.Rejected"){
trace(info.application.message);
// this sends the message
// "Too many connections" to the Output window
// on the client side
}
};
See also
Application.onConnect

Application.server

Availability
Flash Communication Server MX.
Usage
application.server
Description
Property (read-only); contains the platform and the server-version information.
Example
The following example checks the
inside the
statement:
if
if (application.server == "Flash Communication Server-Windows/1.0"){
// insert code here
}
, you can either accept or reject the connection. You can also define a
that calls an application server for authentication. In that
application.rejectConnection
. The message "Too many connections" appears on the server
err.message
,
Application.acceptConnection
property against a string before executing the code
server
application.onConnect
from the application server's
is rejected and provided with the error
client1
Server-Side Communication ActionScript
23

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash communication server mx

Table of Contents