User Guide
42 Server-Side ActionScript Language Reference
Example
In the following example, the application.registerProxy method is called in a function
in the
application.onAppStart event handler and executes when the application starts. In
the function block, a new NetConnection object called
myProxy is created and connected.
The
application.registerProxy method is then called to assign the method getXyz to the
myProxy object.
application.onAppStart = function(){
var myProxy = new NetConnection();
myProxy.connect("rtmp://xyz.com/myApp");
application.registerProxy("getXyz", myProxy);
};
Application.rejectConnection()
Availability
Flash Communication Server MX 1.0.
Usage
application.rejectConnection(clientObj, errObj)
Parameters
clientObj A client to reject.
errObj An object of any type that is sent to the client, explaining the reason for rejection.
The
errObj object is available in client-side scripts as the application property of the
information object that is passed to the
application.onStatus call when the connection is
rejected. For more information, see the appendix, “Client-Side Information Objects,” in the
Client-Side ActionScript Language Reference for Flash Media Server 2.
Returns
Nothing.
Description
Method; rejects the connection call from a client to the server. The application.onConnect
event handler notifies a script when a new client is connecting. In the function assigned to
application.onConnect, you can either accept or reject the connection. You can also define
a function for
application.onConnect that calls an application server for authentication. In
that case, an application could call
application.rejectConnection from the application
server’s response callback to disconnect the client from the server.