MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Manuel d'utilisateur Page 18

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 80
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 17
18
Application.onConnect
Availability
Flash Communication Server MX.
Usage
application.onConnect = function (clientObj [, p1, ..., pN]){
// insert code here to call methods that do authentication
// returning null puts client in a pending state
return null;
};
(usage 2)
application.onConnect = function (clientObj [, p1, ..., pN]){
// insert code here to call methods that do authentication
// accepts the connection
application.acceptConnection(clientObj);
};
(usage 3)
application.onConnect = function (clientObj [, p1, ..., pN])
{
// insert code here to call methods that do authentication
// accepts the connection by returning true
return true;
};
Parameters
clientObj The client connecting to the application.
p1 ..., pN Optional parameters passed to the application.onConnect method. These
parameters are passed from the client-side
NetConnection.connect method when a client
connects to the application.
Returns
The value you provide. If you return a Boolean value of true, the server accepts the connection; if
the value is false, the server rejects the connection. If you return null or no return value, the
server puts the client in a pending state and the client cant receive or send messages. If the client
is put in a pending state, you must call
application.acceptConnection or
application.rejectConnection at a later time to accept or reject the connection. For example,
you can perform external authentication by making a NetConnection call in your
application.onConnect event handler to an application server, and having the reply handler
call
application.acceptConnection or application.rejectConnection, depending on the
information received by the reply handler.
You can also call
application.acceptConnection or application.rejectConnection inside
the
application.onConnect event handler. If you do, any value returned by the function is
ignored.
Vue de la page 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 79 80

Commentaires sur ces manuels

Pas de commentaire